Sync latest web IM fixes
This commit is contained in:
+36
-15
@@ -1,5 +1,11 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
const runtimeEnvironment = process.env.VUE_APP_RUNTIME_ENV === 'production'
|
||||
? 'production'
|
||||
: 'local';
|
||||
const appServerTarget = process.env.VUE_APP_APP_SERVER_TARGET || 'http://18.141.44.165:8888';
|
||||
const webApiTarget = process.env.VUE_APP_WEB_API_TARGET || 'http://18.141.44.165:9000';
|
||||
|
||||
module.exports = {
|
||||
outputDir: 'dist',
|
||||
@@ -9,8 +15,8 @@ module.exports = {
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
'legacy-wfc': path.resolve(__dirname, '../src/wfc'),
|
||||
'legacy-config': path.resolve(__dirname, '../src/config.js')
|
||||
'legacy-wfc': path.resolve(__dirname, '../src/wfc'),
|
||||
'legacy-config': path.resolve(__dirname, '../src/config.js')
|
||||
},
|
||||
fallback: {
|
||||
path: false,
|
||||
@@ -34,18 +40,33 @@ module.exports = {
|
||||
client: {
|
||||
overlay: false
|
||||
},
|
||||
proxy: {
|
||||
'/local-api': {
|
||||
target: 'http://127.0.0.1:8024',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/local-api': '/api'
|
||||
}
|
||||
}
|
||||
proxy: {
|
||||
'/app-server': {
|
||||
target: appServerTarget,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/app-server': ''
|
||||
}
|
||||
},
|
||||
'/local-api': {
|
||||
target: webApiTarget,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/local-api': '/api'
|
||||
}
|
||||
},
|
||||
'/api': {
|
||||
target: webApiTarget,
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.optimization.concatenateModules(false);
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugin('html').tap((args) => {
|
||||
args[0].runtimeConfigFile = `runtime-config.${runtimeEnvironment}.js`;
|
||||
return args;
|
||||
});
|
||||
config.optimization.concatenateModules(false);
|
||||
config.optimization.minimize(false);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user