-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Description
What problem does this feature solve?
Renaming or moving the public folder in order to use vue-cli alongside other frameworks (e.g. Laravel).
Yes, it is possible to achieve it with this configuration:
const path = require('path')
const publicDir = 'assets/html';
module.exports = {
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].template = path.resolve(publicDir + '/index.html');
return args
})
config
.plugin('copy')
.tap(([pathConfigs]) => {
pathConfigs[0].from = path.resolve(publicDir);
return [pathConfigs]
})
}
}
But for such a simple configuration this feels ridiculous.
What does the proposed API look like?
Specify the public directory path in the vue.config.js
module.exports = {
publicDir: 'assets/html' // Defaults to 'public'
}
masquevil, tpavard, SeregPie, Sergej-Popov, rystaf and 8 more
Metadata
Metadata
Assignees
Labels
No labels