f1b1f351 by 杨威

合并代码

1 parent 523e3637
......@@ -5,6 +5,7 @@ let Timestamp = new Date().getTime();
function resolve(dir) {
return path.join(__dirname, dir)
}
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
module.exports = {
publicPath: './',
......@@ -13,6 +14,7 @@ module.exports = {
config.resolve.alias
.set('@', resolve('src'))
.set('@api', resolve('src/api'))
.set('@assets', resolve('src/assets'))
.set('@mixins', resolve('src/mixins'))
.set('@store', resolve('src/store'))
.set('@libs', resolve('src/libs'))
......@@ -30,8 +32,17 @@ module.exports = {
filename: `js/[name].${Timestamp}.js`,
chunkFilename: `js/[name].${Timestamp}.js`
},
// plugins: [
plugins: [
// 去除console和debugger
// new UglifyJsPlugin({
// uglifyOptions: {
// compress: {
// drop_console: true,
// drop_debugger: true,
// },
// },
// parallel: true,
// }),
// new FileManagerPlugin({ //初始化 filemanager-webpack-plugin 插件实例
// onEnd: {
// mkdir: ['./zip','./dist'], //初始化生产zip和dist文件夹
......@@ -40,17 +51,19 @@ module.exports = {
// ]
// }
// })
// ]
]
},
devServer: {
host: "127.0.0.1",
host: "192.168.2.61",
port: 8008,
https: false,
hotOnly: false,
proxy: {
"/api": {
//target: process.env.VUE_APP_api, //巍巍
target: process.env.VUE_APP_api1, //本地
// target: 'https://192.168.2.119:8006', //泽平
// target: process.env.VUE_APP_api1, //本地
target: process.env.VUE_APP_api, //赵千
// target: process.env.VUE_APP_api4, //赵千
changeOrigin: true,
pathRewrite: {
"^/api": "/",
......