冲突合并
Showing
2 changed files
with
9 additions
and
23 deletions
| 1 | VUE_APP_api = 'https://192.168.2.111:8006' | 1 | VUE_APP_api = 'https://192.168.2.111:8006' |
| 2 | VUE_APP_api1 = 'https://127.0.0.1:8006' | 2 | VUE_APP_api1 = 'https://127.0.0.1:8006' |
| 3 | VUE_APP_api2 = 'https://192.168.2.9:8006' | 3 | VUE_APP_api2 = 'https://192.168.2.145:8006' |
| 4 | VUE_APP_api3 = 'https://192.168.2.11:8006' | 4 | VUE_APP_api3 = 'https://192.168.2.119:8006' |
| 5 | VUE_APP_api4 = 'http://192.168.2.111:18080' | 5 | VUE_APP_api4 = 'http://192.168.2.146:8006' |
| 6 | VUE_APP_api5 = 'https://192.168.2.142:8006' | ||
| 6 | VUE_APP_name = '开发环境' | 7 | VUE_APP_name = '开发环境' |
| 7 | NODE_ENV="development" | 8 | NODE_ENV="development" |
| 8 | VUE_APP_VERSION = 'psh' | 9 | VUE_APP_VERSION = 'psh' | ... | ... |
| ... | @@ -5,7 +5,6 @@ let Timestamp = new Date().getTime(); | ... | @@ -5,7 +5,6 @@ let Timestamp = new Date().getTime(); |
| 5 | function resolve(dir) { | 5 | function resolve(dir) { |
| 6 | return path.join(__dirname, dir) | 6 | return path.join(__dirname, dir) |
| 7 | } | 7 | } |
| 8 | const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); | ||
| 9 | 8 | ||
| 10 | module.exports = { | 9 | module.exports = { |
| 11 | publicPath: './', | 10 | publicPath: './', |
| ... | @@ -20,7 +19,6 @@ module.exports = { | ... | @@ -20,7 +19,6 @@ module.exports = { |
| 20 | .set('@libs', resolve('src/libs')) | 19 | .set('@libs', resolve('src/libs')) |
| 21 | .set('@router', resolve('src/router')) | 20 | .set('@router', resolve('src/router')) |
| 22 | .set('@components', resolve('src/components')) | 21 | .set('@components', resolve('src/components')) |
| 23 | .set('@assets', resolve('src/assets')) | ||
| 24 | }, | 22 | }, |
| 25 | pluginOptions: { | 23 | pluginOptions: { |
| 26 | 'style-resources-loader': { | 24 | 'style-resources-loader': { |
| ... | @@ -33,17 +31,8 @@ module.exports = { | ... | @@ -33,17 +31,8 @@ module.exports = { |
| 33 | filename: `js/[name].${Timestamp}.js`, | 31 | filename: `js/[name].${Timestamp}.js`, |
| 34 | chunkFilename: `js/[name].${Timestamp}.js` | 32 | chunkFilename: `js/[name].${Timestamp}.js` |
| 35 | }, | 33 | }, |
| 36 | plugins: [ | 34 | devtool: 'source-map' |
| 37 | // 去除console和debugger | 35 | // plugins: [ |
| 38 | // new UglifyJsPlugin({ | ||
| 39 | // uglifyOptions: { | ||
| 40 | // compress: { | ||
| 41 | // drop_console: true, | ||
| 42 | // drop_debugger: true, | ||
| 43 | // }, | ||
| 44 | // }, | ||
| 45 | // parallel: true, | ||
| 46 | // }), | ||
| 47 | // new FileManagerPlugin({ //初始化 filemanager-webpack-plugin 插件实例 | 36 | // new FileManagerPlugin({ //初始化 filemanager-webpack-plugin 插件实例 |
| 48 | // onEnd: { | 37 | // onEnd: { |
| 49 | // mkdir: ['./zip','./dist'], //初始化生产zip和dist文件夹 | 38 | // mkdir: ['./zip','./dist'], //初始化生产zip和dist文件夹 |
| ... | @@ -52,20 +41,16 @@ module.exports = { | ... | @@ -52,20 +41,16 @@ module.exports = { |
| 52 | // ] | 41 | // ] |
| 53 | // } | 42 | // } |
| 54 | // }) | 43 | // }) |
| 55 | ] | 44 | // ] |
| 56 | }, | 45 | }, |
| 57 | devServer: { | 46 | devServer: { |
| 58 | host: "192.168.2.61", | ||
| 59 | host: "0.0.0.0", | 47 | host: "0.0.0.0", |
| 60 | port: 8008, | 48 | port: 8006, |
| 61 | https: false, | 49 | https: false, |
| 62 | hotOnly: false, | 50 | hotOnly: false, |
| 63 | proxy: { | 51 | proxy: { |
| 64 | "/api": { | 52 | "/api": { |
| 65 | // target: 'https://192.168.2.119:8006', //泽平 | 53 | target: process.env.VUE_APP_api2, |
| 66 | // target: process.env.VUE_APP_api1, //本地 | ||
| 67 | target: process.env.VUE_APP_api, //赵千 | ||
| 68 | // target: process.env.VUE_APP_api4, //赵千 | ||
| 69 | changeOrigin: true, | 54 | changeOrigin: true, |
| 70 | pathRewrite: { | 55 | pathRewrite: { |
| 71 | "^/api": "/", | 56 | "^/api": "/", | ... | ... |
-
Please register or sign in to post a comment