forked from FormidableLabs/recipes-flux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (35 loc) · 894 Bytes
/
webpack.config.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
// Webpack configuration
var path = require("path");
var webpack = require("webpack");
module.exports = {
cache: true,
context: path.join(__dirname, "client"),
entry: "./app.js",
output: {
path: path.join(__dirname, "app/js-dist"),
filename: "bundle.js"
},
module: {
loaders: [
{ test: /\.jsx$/, loader: "jsx-loader" }
]
},
resolve: {
extensions: ["", ".js", ".jsx"]
},
plugins: [
// Optimize
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin(),
new webpack.DefinePlugin({
"process.env": {
// Signal production mode for React JS libs.
NODE_ENV: JSON.stringify("production")
}
}),
// Manually do source maps to use alternate host.
new webpack.SourceMapDevToolPlugin(
"bundle.js.map",
"\n//# sourceMappingURL=http://127.0.0.1:3001/app/js-dist/[url]")
]
};