20 lines
453 B
JavaScript
20 lines
453 B
JavaScript
|
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]
|
||
|
})
|
||
|
}
|
||
|
}
|