mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-27 17:49:06 -06:00
29 lines
641 B
JavaScript
29 lines
641 B
JavaScript
exports.clientAddonConfig = function ({ id, port = 8042 }) {
|
|
return {
|
|
baseUrl: `/_addon/${id}`,
|
|
devBaseUrl: `http://localhost:${port}/`,
|
|
configureWebpack: {
|
|
output: {
|
|
// Important
|
|
filename: 'index.js'
|
|
}
|
|
},
|
|
css: {
|
|
extract: false
|
|
},
|
|
chainWebpack: config => {
|
|
config.plugins.delete('preload')
|
|
config.plugins.delete('prefetch')
|
|
config.plugins.delete('html')
|
|
config.plugins.delete('optimize-css')
|
|
config.optimization.splitChunks(false)
|
|
},
|
|
devServer: {
|
|
headers: {
|
|
'Access-Control-Allow-Origin': '*'
|
|
},
|
|
port
|
|
}
|
|
}
|
|
}
|