-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
47 lines (46 loc) · 1.29 KB
/
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
43
44
45
46
47
var webpack = require('webpack');
module.exports = {
resolve: {
modulesDirectories: ["web", "node_modules", "bower_components"]
},
entry: {
auth: "./dist/js/auth.js",
dashboard: './dist/js/app.js',
chat: './dist/js/chat.js',
browser: './dist/js/browser.js',
ide: './dist/js/chat.js',
remote: './dist/js/remote.js'
},
output: {
path: './dist/js/',
filename: "[name].bundle.min.js",
chunkFilename: "[id].chunk.min.js"
},
devtool: 'source-map',
module: {
loaders: [
{test: /\.css$/, loader: 'style!css'}
]
},
plugins: [
new webpack.ResolverPlugin(
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin(".bower.json", ["main"])
),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
minimize: true,
warnings: false,
mangle: {
except: ['$q', '$ocLazyLoad']
},
sourceMap: false
}),
new webpack.optimize.CommonsChunkPlugin({
filename: "commons.min.js",
name: "commons"
}),
new webpack.DefinePlugin({
ON_DEMO: process.env.NODE_ENV === 'demo'
})
]
};