module.exports = { //设置为空打包后不分更目录还是多级目录 publicPath: './', //build编译后存放静态文件的目录 outputDir: 'manage', //构建时的输出目录 assetsDir: "static", lintOnSave: true, // build编译后不生成资源MAP文件 productionSourceMap: false, devServer: { proxy: { '/appengine/883web': { //这里最好有一个 / target: 'http://127.0.0.1:9080', // 后台接口域名 ws: true, //如果要代理 websockets,配置这个参数 secure: false, // 如果是https接口,需要配置这个参数 changeOrigin: true, //是否跨域 pathRewrite: { '^/appengine/883web': '' } } } }, chainWebpack: config => { // 移除 prefetch 插件 config.plugins.delete('preload'); config.plugins.delete('prefetch'); config .plugin('html') .tap(args => { args[0].title = 'ERP系统' return args }) }, configureWebpack: config => { //性能提示 config.performance = { hints: false } config.optimization = { splitChunks: { chunks: "async", automaticNameDelimiter: '~', name: true, cacheGroups: { //第三方库抽离 vendor: { name: "modules", test: /[\\/]node_modules[\\/]/, priority: -10 }, tinymce: { name: "tinymce", test: /[\\/]node_modules[\\/]tinymce[\\/]/ }, echarts: { name: "echarts", test: /[\\/]node_modules[\\/]echarts[\\/]/ } } } } } }