|
@@ -1,3 +1,8 @@
|
|
|
|
|
+
|
|
|
|
|
+const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const path = require('path')
|
|
const path = require('path')
|
|
|
const defaultSettings = require('./src/config/index.js')
|
|
const defaultSettings = require('./src/config/index.js')
|
|
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
|
@@ -39,6 +44,7 @@ require('events').EventEmitter.defaultMaxListeners = 0;
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
module.exports = defineConfig({
|
|
module.exports = defineConfig({
|
|
|
|
|
+
|
|
|
publicPath: './', // 署应用包时的基本 URL。 vue-router hash 模式使用
|
|
publicPath: './', // 署应用包时的基本 URL。 vue-router hash 模式使用
|
|
|
outputDir: 'app', // 生产环境构建文件的目录
|
|
outputDir: 'app', // 生产环境构建文件的目录
|
|
|
assetsDir: 'static', // outputDir的静态资源(js、css、img、fonts)目录
|
|
assetsDir: 'static', // outputDir的静态资源(js、css、img、fonts)目录
|
|
@@ -119,6 +125,7 @@ module.exports = defineConfig({
|
|
|
},
|
|
},
|
|
|
'/dev': {
|
|
'/dev': {
|
|
|
target: "http://47.92.229.224:8080",
|
|
target: "http://47.92.229.224:8080",
|
|
|
|
|
+ // target: "http://10.87.23.48:8080",
|
|
|
// ws:true,
|
|
// ws:true,
|
|
|
changOrigin:true,
|
|
changOrigin:true,
|
|
|
pathRewrite:{
|
|
pathRewrite:{
|
|
@@ -159,9 +166,11 @@ module.exports = defineConfig({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
configureWebpack: config => {
|
|
configureWebpack: config => {
|
|
|
config.name = name
|
|
config.name = name
|
|
|
-
|
|
|
|
|
|
|
+ // config.plugins= [new NodePolyfillPlugin()]
|
|
|
// 为生产环境修改配置...
|
|
// 为生产环境修改配置...
|
|
|
// if (IS_PROD) {
|
|
// if (IS_PROD) {
|
|
|
// // externals
|
|
// // externals
|