|
@@ -1,49 +1,50 @@
|
|
|
-'use strict'
|
|
|
+"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
-const path = require('path')
|
|
|
+const path = require("path");
|
|
|
|
|
|
-const pathSrc = path.resolve(__dirname, '../src');
|
|
|
+const pathSrc = path.resolve(__dirname, "../src");
|
|
|
|
|
|
let proxyTable = {
|
|
|
- '/icore.icp.web/pass/v1/sysusers/user/token': {
|
|
|
+ "/icore.icp.web/pass/v1/sysusers/user/token": {
|
|
|
+
|
|
|
|
|
|
- target:'http://172.16.33.166:9001/v1/sysusers/user/token',
|
|
|
+ target: "http://172.16.33.166:9001/v1/sysusers/user/token",
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: {
|
|
|
- '^/icore.icp.web/pass/v1/sysusers/user/token': '/'
|
|
|
+ "^/icore.icp.web/pass/v1/sysusers/user/token": "/"
|
|
|
}
|
|
|
},
|
|
|
- '/icore.icp.web/pass/v1': {
|
|
|
+ "/icore.icp.web/pass/v1": {
|
|
|
|
|
|
- target: 'http://172.16.33.166:9001/v1',
|
|
|
+ target: "http://172.16.33.166:9001/v1",
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: {
|
|
|
- '^/icore.icp.web/pass/v1': '/'
|
|
|
+ "^/icore.icp.web/pass/v1": "/"
|
|
|
|
|
|
}
|
|
|
},
|
|
|
- '/icore.icp.web/pass/auth/login': {
|
|
|
-
|
|
|
- target: 'http://172.16.33.166:9001/auth/login',
|
|
|
- changeOrigin: true,
|
|
|
- pathRewrite: {
|
|
|
- '^/icore.icp.web/pass/auth/login': ''
|
|
|
- }
|
|
|
- },
|
|
|
- '/icore-api': {
|
|
|
- target: 'http://172.16.33.166:9001',
|
|
|
+ "/icore.icp.web/pass/auth/login": {
|
|
|
+
|
|
|
+ target: "http://172.16.33.166:9001/auth/login",
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: {
|
|
|
- '^/icore-api': '/'
|
|
|
+ "^/icore.icp.web/pass/auth/login": ""
|
|
|
}
|
|
|
},
|
|
|
- '/icore.icp.web/pass/act': {
|
|
|
- target: 'http://172.16.33.166:8095',
|
|
|
+ "/icore-api": {
|
|
|
+ target: "http://172.16.33.166:9001",
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: {
|
|
|
- '^/icore.icp.web/pass/act': '/'
|
|
|
+ "^/icore-api": "/"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "/icore.icp.web/pass/act": {
|
|
|
+ target: "http://172.16.33.166:8095",
|
|
|
+ changeOrigin: true,
|
|
|
+ pathRewrite: {
|
|
|
+ "^/icore.icp.web/pass/act": "/"
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -78,31 +79,31 @@ let proxyTable = {
|
|
|
"^/views/api/v1": "/api/v1"
|
|
|
}
|
|
|
},
|
|
|
- '/icore.icp.web/pass/logout': {
|
|
|
- target: 'http://172.16.33.166:9001/logout',
|
|
|
+ "/icore.icp.web/pass/logout": {
|
|
|
+ target: "http://172.16.33.166:9001/logout",
|
|
|
changeOrigin: true,
|
|
|
pathRewrite: {
|
|
|
- '^/icore.icp.web/pass/logout': '/'
|
|
|
- }
|
|
|
- },
|
|
|
-}
|
|
|
-let dist = '../dist';
|
|
|
-if (pathSrc.indexOf('node_modules') > -1) {
|
|
|
- dist = '../../../dist';
|
|
|
- let proxyTableGet = require('../../../cors.js').proxyTable;
|
|
|
- for (let i in proxyTableGet) {
|
|
|
- proxyTable[i] = proxyTableGet[i]
|
|
|
+ "^/icore.icp.web/pass/logout": "/"
|
|
|
}
|
|
|
+ }
|
|
|
+};
|
|
|
+let dist = "../dist";
|
|
|
+if (pathSrc.indexOf("node_modules") > -1) {
|
|
|
+ dist = "../../../dist";
|
|
|
+ let proxyTableGet = require("../../../cors.js").proxyTable;
|
|
|
+ for (let i in proxyTableGet) {
|
|
|
+ proxyTable[i] = proxyTableGet[i];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
module.exports = {
|
|
|
- dev: {
|
|
|
-
|
|
|
- assetsSubDirectory: 'static',
|
|
|
- assetsPublicPath: '/',
|
|
|
- proxyTable: proxyTable,
|
|
|
+ dev: {
|
|
|
+
|
|
|
+ assetsSubDirectory: "static",
|
|
|
+ assetsPublicPath: "/",
|
|
|
+ proxyTable: proxyTable,
|
|
|
|
|
|
- host: 'localhost',
|
|
|
+ host: "localhost",
|
|
|
port: 8802,
|
|
|
autoOpenBrowser: false,
|
|
|
errorOverlay: true,
|
|
@@ -139,15 +140,14 @@ module.exports = {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
-
|
|
|
build: {
|
|
|
|
|
|
- index: path.resolve(__dirname, dist + '/index.html'),
|
|
|
+ index: path.resolve(__dirname, dist + "/index.html"),
|
|
|
|
|
|
|
|
|
assetsRoot: path.resolve(__dirname, dist),
|
|
|
- assetsSubDirectory: 'static',
|
|
|
- assetsPublicPath: '../',
|
|
|
+ assetsSubDirectory: "static",
|
|
|
+ assetsPublicPath: "../",
|
|
|
|
|
|
|
|
|
* Source Maps
|
|
@@ -155,14 +155,14 @@ module.exports = {
|
|
|
|
|
|
productionSourceMap: false,
|
|
|
|
|
|
- devtool: '#source-map',
|
|
|
+ devtool: "#source-map",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
productionGzip: false,
|
|
|
- productionGzipExtensions: ['js', 'css'],
|
|
|
+ productionGzipExtensions: ["js", "css"],
|
|
|
|
|
|
|
|
|
|
|
@@ -170,4 +170,4 @@ module.exports = {
|
|
|
|
|
|
bundleAnalyzerReport: process.env.npm_config_report
|
|
|
}
|
|
|
-}
|
|
|
+};
|