vue-multisite-test/vue.config.js

20 lines
453 B
JavaScript
Raw Permalink Normal View History

2020-01-28 22:53:49 +00:00
let PUBLIC_PATH = process.env.SITE_NAME === "admin" ? "custom-public" : "public";
module.exports = {
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].template = PUBLIC_PATH + '/index.html'
return args
})
config
.plugin('copy')
.tap(([pathConfigs]) => {
pathConfigs[0].from = PUBLIC_PATH;
return [pathConfigs]
})
}
}