标签:cti 修改 color public dev set require tput style
1、修改packjson
新增一个要编译的命令
"builddev": "node build/builddev.js"
2、新建一个builddev.js
process.env.type = ‘"builddev"‘
require(‘./build‘)
3、index.js修改
把build复制一份,修改相应的index、assetsRoot、assetsSubDirectory、assetsPublicPath
4、修改webpack.base.conf.js
publicPath: process.env.NODE_ENV === ‘production‘
? (process.env.type == ‘"builddev"‘ ? config.builddev.assetsPublicPath : config.build.assetsPublicPath)
: config.dev.assetsPublicPath
5、修改webpack.prod.conf.js
output: { path: process.env.type == ‘"builddev"‘ ? config.builddev.assetsRoot : config.build.assetsRoot },
标签:cti 修改 color public dev set require tput style
原文地址:https://www.cnblogs.com/qzccl/p/9640653.html