Skip to content

Instantly share code, notes, and snippets.

@marvinrabe
Last active December 25, 2018 16:20
Show Gist options
  • Save marvinrabe/98532a1e0a8b98ff431ea4749bdc175e to your computer and use it in GitHub Desktop.
Save marvinrabe/98532a1e0a8b98ff431ea4749bdc175e to your computer and use it in GitHub Desktop.
Change path of public folder in vue-cli
const path = require('path')
const publicDir = 'assets/html'
module.exports = {
chainWebpack: config => {
config
.plugin('html')
.tap(configs => {
configs[0].template = path.resolve(publicDir + '/index.html');
return configs
})
config
.plugin('copy')
.tap(([pathConfigs]) => {
pathConfigs[0].from = path.resolve(publicDir);
return [pathConfigs]
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment