f1b1f351 by 杨威

合并代码

1 parent 523e3637
...@@ -5,6 +5,7 @@ let Timestamp = new Date().getTime(); ...@@ -5,6 +5,7 @@ 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");
8 9
9 module.exports = { 10 module.exports = {
10 publicPath: './', 11 publicPath: './',
...@@ -13,6 +14,7 @@ module.exports = { ...@@ -13,6 +14,7 @@ module.exports = {
13 config.resolve.alias 14 config.resolve.alias
14 .set('@', resolve('src')) 15 .set('@', resolve('src'))
15 .set('@api', resolve('src/api')) 16 .set('@api', resolve('src/api'))
17 .set('@assets', resolve('src/assets'))
16 .set('@mixins', resolve('src/mixins')) 18 .set('@mixins', resolve('src/mixins'))
17 .set('@store', resolve('src/store')) 19 .set('@store', resolve('src/store'))
18 .set('@libs', resolve('src/libs')) 20 .set('@libs', resolve('src/libs'))
...@@ -30,8 +32,17 @@ module.exports = { ...@@ -30,8 +32,17 @@ module.exports = {
30 filename: `js/[name].${Timestamp}.js`, 32 filename: `js/[name].${Timestamp}.js`,
31 chunkFilename: `js/[name].${Timestamp}.js` 33 chunkFilename: `js/[name].${Timestamp}.js`
32 }, 34 },
33 // plugins: [ 35 plugins: [
34 36 // 去除console和debugger
37 // new UglifyJsPlugin({
38 // uglifyOptions: {
39 // compress: {
40 // drop_console: true,
41 // drop_debugger: true,
42 // },
43 // },
44 // parallel: true,
45 // }),
35 // new FileManagerPlugin({ //初始化 filemanager-webpack-plugin 插件实例 46 // new FileManagerPlugin({ //初始化 filemanager-webpack-plugin 插件实例
36 // onEnd: { 47 // onEnd: {
37 // mkdir: ['./zip','./dist'], //初始化生产zip和dist文件夹 48 // mkdir: ['./zip','./dist'], //初始化生产zip和dist文件夹
...@@ -40,17 +51,19 @@ module.exports = { ...@@ -40,17 +51,19 @@ module.exports = {
40 // ] 51 // ]
41 // } 52 // }
42 // }) 53 // })
43 // ] 54 ]
44 }, 55 },
45 devServer: { 56 devServer: {
46 host: "127.0.0.1", 57 host: "192.168.2.61",
47 port: 8008, 58 port: 8008,
48 https: false, 59 https: false,
49 hotOnly: false, 60 hotOnly: false,
50 proxy: { 61 proxy: {
51 "/api": { 62 "/api": {
52 //target: process.env.VUE_APP_api, //巍巍 63 // target: 'https://192.168.2.119:8006', //泽平
53 target: process.env.VUE_APP_api1, //本地 64 // target: process.env.VUE_APP_api1, //本地
65 target: process.env.VUE_APP_api, //赵千
66 // target: process.env.VUE_APP_api4, //赵千
54 changeOrigin: true, 67 changeOrigin: true,
55 pathRewrite: { 68 pathRewrite: {
56 "^/api": "/", 69 "^/api": "/",
......