123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- const CompressionPlugin = require("compression-webpack-plugin")
- module.exports = {
- devServer: {
- port: 8090,
- proxy: {
- '/data': {
- target: "http://60.205.177.43",
-
-
-
- changeOrigin: true,
- secure: false,
- pathRewrite: {
- "^/data": "/data",
- },
- },
-
-
-
-
-
-
-
-
-
-
- "/wdfn": {
- target: "http://mapapp.wanda.cn",
- changeOrigin: true,
- pathRewrite: {
- "^/wdfn": "/editor",
- },
- },
-
- "/serve": {
-
- target: 'http://60.205.177.43:28888',
-
- changeOrigin: true,
- pathRewrite: {
- "^/serve": "",
- },
- },
- "/version": {
- target: "http://mapapp.wanda.cn/",
- changeOrigin: true,
- pathRewrite: {
- "^/version": "/sgmap/mapversion",
- },
- },
- },
- hot: true,
-
- overlay: {
- warnings: false,
- errors: false,
- },
- },
- chainWebpack: (config) => {
- const svgRule = config.module.rule("svg")
- svgRule.uses.clear()
- svgRule
- .use("babel-loader")
- .loader("babel-loader")
- .end()
- .use("vue-svg-loader")
- .loader("vue-svg-loader")
- config.output.filename("static/js/[name].[hash].js").end()
- config.output.chunkFilename("static/js/[name].[hash].js").end()
- },
- lintOnSave: false,
- publicPath: "/wandaBmGuide",
-
- outputDir: "wandaBmGuide",
-
- assetsDir: "static",
- transpileDependencies: [
- "@saga-web",
- "@ant-design",
- "element-ui",
- ],
- productionSourceMap: false,
-
- css: {
-
- extract: true,
- },
-
- configureWebpack: (config) => {
- return {
- plugins: [
-
- new CompressionPlugin({
- test: /\.js$|\.html$|.\css/,
- threshold: 10240,
- deleteOriginalAssets: false,
- }),
- ],
- }
- },
- }
|