module.exports = { // 输出文件目录 outputDir: '../../linuxproject/src/web/', devServer: { host: '127.0.0.1', port: 9999, proxy: { '/action': { target: 'http://192.168.1.149/', ws: true, changeOrigin: true, }, } }, productionSourceMap: false, assetsDir:'static', chainWebpack: config => { if (process.env.NODE_ENV === 'production') { // 清除css,js版本号 config.output.filename('static/js/[name].js').end(); config.output.chunkFilename('static/js/[name].js').end(); // 为生产环境修改配置... config.plugin('extract-css').tap(args => [{ filename: `static/css/[name].css`, chunkFilename: `static/css/[name].css` }]) } }, lintOnSave: false }