alibaba / rax

🐰 Rax is a progressive framework for building universal application. https://rax.js.org
Other
7.99k stars 627 forks source link

[Question]web项目编译后的输出目录build/web能不能改成build目录 #2390

Closed Clago closed 1 year ago

Clago commented 1 year ago

代码需要上传到irs平台编译,现在的默认目录是build,有参数可以修改吗

Clago commented 1 year ago

自定义plugin

const fs = require("fs-extra");

module.exports = ({ onHook }) => {
    onHook('after.build.compile',(stats) => {
        try {
            fs.copySync("./build/web","./build")
            console.log("copy success")
        }catch (e) {
            console.log(e)
        }
    })
}