-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
42 lines (39 loc) · 992 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
37
38
39
40
41
42
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
var path = __dirname + "/build";
var config = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : false,
output: {
path: path,
},
plugins: debug ? [] : [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
],
module: {
loaders: [
{
test: /.js?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
}
]
}
};
// Add more configurations if you want! :)
var users = Object.assign({}, config, {
name: "users",
entry: "./src/users.js",
output: {
path: path,
filename: "./build/users-deploy.js"
},
});
module.exports = [
users
];