forked from Pleio/rijkshuisstijl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.prod.config.js
35 lines (34 loc) · 925 Bytes
/
webpack.prod.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
var webpack = require("webpack");
module.exports = {
entry: {
rijkshuisstijl: "./src/js/rijkshuisstijl.js",
rijkshuisstijlAdmin: "./src/js/admin.jsx",
splash: "./src/js/splash.js"
},
output: {
path: "./assets",
publicPath: "/mod/rijkshuisstijl/assets/",
filename: "[name].js",
chunkFilename: "[id].js"
},
module: {
loaders: [
{
test: /\.jsx$/,
loader: 'babel?presets[]=es2015,presets[]=stage-0,presets[]=react'
}
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({compress: { warnings: false }}),
new webpack.optimize.DedupePlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
],
resolve: {
extensions: ['', '.js', '.jsx']
}
}