-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.prod.config.js
More file actions
43 lines (40 loc) · 926 Bytes
/
Copy pathwebpack.prod.config.js
File metadata and controls
43 lines (40 loc) · 926 Bytes
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
const webpack = require('webpack');
/* This is a config file that handles compiling web workers and injecting them
* into the public folder to be able to reference them at run time
*/
module.exports = {
entry: {
averageColorsWorker: __dirname+'/src/workers/averageColorsWorker.js',
filtersWorker: __dirname+'/src/workers/filtersWorker.js'
},
output: {
path: __dirname+'/public/workers',
filename: "[name].js"
},
module: {
loaders: [
{
test: /\.js$/,
loader: "babel",
query: {
presets: ['env'],
}
}
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
warnings: false
},
mangle: {
screw_ie8: true
},
output: {
comments: false,
screw_ie8: true
}
})
]
};