-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.prod.js
37 lines (34 loc) · 1.07 KB
/
webpack.config.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
import path from "path";
import webpack from "webpack";
import HtmlWebPackPlugin from "html-webpack-plugin";
import WebpackMd5Hash from "webpack-md5-hash";
import ExtrackTextPlugin from "extract-text-webpack-plugin";
export default {
"debug": true,
"devtool": "source-map",
"noInfo": false,
"entry": {
//"vendedor": path.resolve(__dirname, "src/vendedor"),
"bundle": path.resolve(__dirname, "src/index")
},
"target": "web",
"output": {
"path": path.resolve(__dirname, "public"),
"publicPath": "/",
"filename": "[name].js"
},
"plugins": [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin()
],
"module": {
"loaders": [
{"test": /\.js$/, "exclude": /node_modules/, "loaders": ["babel"]},
{"test": /\.es6/, "exclude": /node_modules/, "loaders": ["babel"]},
// {"test": /\.css$/, "loader": ExtrackTextPlugin.extract("css?sourceMap")}
]
},
"resolve": {
"extensions": ["", ".js", ".jsx", ".es6", "json"]
}
};