Last active
December 25, 2018 16:20
-
-
Save marvinrabe/98532a1e0a8b98ff431ea4749bdc175e to your computer and use it in GitHub Desktop.
Change path of public folder in vue-cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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