@Mintonne answer almost work for me, but had problems with the 'copy' plugin modification. Adapted from an answer on this vue-cli issue https://github.com/vuejs/vue-cli/issues/1550
const path = require("path");
module.exports = {
pages: {
index: {
entry: "client/src/main.js",
template: "client/public/index.html"
}
},
configureWebpack: {
resolve: {
alias: {
"@": path.resolve(__dirname, "client/src")
}
}
},
devServer: {
contentBase: path.join(__dirname, "client/public")
},
chainWebpack: config => {
config.plugin('copy')
.tap(([pathConfigs]) => {
var conf = [{
from: path.resolve(__dirname, 'client/public'),
to: path.resolve(__dirname, 'dist')
}]
if (!pathConfigs) {
pathConfigs = conf
} else {
pathConfigs.concat(conf)
}
return [pathConfigs]
})
}
};