guoxiaohuan 4 years ago
parent
commit
9422bb697c
1 changed files with 27 additions and 27 deletions
  1. 27 27
      vue.config.js

+ 27 - 27
vue.config.js

@@ -1,17 +1,17 @@
-const CompressionPlugin = require("compression-webpack-plugin")
+const CompressionPlugin = require('compression-webpack-plugin')
 module.exports = {
     devServer: {
         port: 8090,
         proxy: {
-            "/data": {
-                target: "http://60.205.177.43",
-                // target: 'http://10.199.143.126',
+            '/data': {
+                // target: "http://60.205.177.43",
+                target: 'http://10.199.143.126',
                 // target: 'http://192.168.200.11:9003', //yll
                 // target: 'http://localhost:6040/data/',
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {
-                    "^/data": "/data",
+                    '^/data': '/data',
                 },
             },
             // // 工程信息化服务
@@ -24,27 +24,27 @@ module.exports = {
             //     },
             // },
             // 万达蜂鸟服务
-            "/wdfn": {
-                target: "http://map.wanda.cn",
+            '/wdfn': {
+                target: 'http://map.wanda.cn',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/wdfn": "/editor",
+                    '^/wdfn': '/editor',
                 },
             },
             // 图例库服务
-            "/serve": {
+            '/serve': {
                 // target: 'http://192.168.200.87:8088',
-                target: "http://60.205.177.43:8080",
+                target: 'http://60.205.177.43:8080',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/serve": "",
+                    '^/serve': '',
                 },
             },
-            "/version": {
-                target: "http://mapapp.wanda.cn/",
+            '/version': {
+                target: 'http://mapapp.wanda.cn/',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/version": "/sgmap/mapversion",
+                    '^/version': '/sgmap/mapversion',
                 },
             },
         },
@@ -56,27 +56,27 @@ module.exports = {
         },
     },
     chainWebpack: (config) => {
-        const svgRule = config.module.rule("svg")
+        const svgRule = config.module.rule('svg')
         svgRule.uses.clear()
         svgRule
-            .use("babel-loader")
-            .loader("babel-loader")
+            .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()
+            .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",
+    publicPath: '/wandaBmGuide',
     // 打包名称
-    outputDir: "wandaBmGuide",
+    outputDir: 'wandaBmGuide',
     // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
-    assetsDir: "static",
+    assetsDir: 'static',
     transpileDependencies: [
-        "@saga-web", // 指定对第三方依赖包进行babel-polyfill处理
-        "@ant-design",
-        "element-ui",
+        '@saga-web', // 指定对第三方依赖包进行babel-polyfill处理
+        '@ant-design',
+        'element-ui',
     ],
     productionSourceMap: false, //
     // CSS 相关选项