forked from qiniu/js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.prod.js
38 lines (38 loc) · 874 Bytes
/
webpack.prod.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var webpack = require("webpack");
var UglifyJSPlugin = require("uglifyjs-webpack-plugin");
var merge = require("webpack-merge");
var common = require("./webpack.common.js");
var path = require("path");
module.exports = merge(common, {
devtool: "source-map",
devServer: {
disableHostCheck: true,
progress: true,
proxy: {
"/api/*": {
target: "http://0.0.0.0:9000",
changeOrigin: true,
secure: false
}
},
host: "0.0.0.0",
contentBase: path.join(__dirname, "./"),
publicPath: "/dist/",
hot: false,
inline: false
},
plugins: [
new UglifyJSPlugin({
sourceMap: true,
uglifyOptions:{
output: {
comments: false,
beautify: false
}
}
}),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify("production")
})
]
});