| | |
| | | host: 'localhost', |
| | | port: port, |
| | | open: true, |
| | | headers: { |
| | | "Access-Control-Allow-Origin": "*", |
| | | }, |
| | | proxy: { |
| | | // 跨域配置 |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: `http://localhost:8080`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ['^' + process.env.VUE_APP_BASE_API]: '' |
| | | } |
| | | "/sccg": { |
| | | target: `http://42.193.1.25/`, |
| | | // target: `http://127.0.0.1:8082/`, |
| | | changeOrigin: true |
| | | } |
| | | }, |
| | | // disableHostCheck: true |
| | |
| | | config |
| | | .when(process.env.NODE_ENV !== 'development', |
| | | config => { |
| | | // config |
| | | // .plugin('ScriptExtHtmlWebpackPlugin') |
| | | // .after('html') |
| | | // .use('script-ext-html-webpack-plugin', [{ |
| | | // // `runtime` must same as runtimeChunk name. default is `runtime` |
| | | // inline: /runtime\..*\.js$/ |
| | | // }]) |
| | | // .end() |
| | | config |
| | | .optimization.splitChunks({ |
| | | chunks: 'all', |