forked from iam4x/pokemongo-webspoof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.babel.js
55 lines (50 loc) · 1.22 KB
/
webpack.config.babel.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
48
49
50
51
52
53
54
55
import webpack from 'webpack'
export default {
entry: [
'babel-polyfill',
'./src/index.js'
],
output: {
path: './dist',
filename: 'index.js',
chunkFilename: '[name].js'
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel' },
{ test: /\.css$/, loader: 'style!css!postcss' }
]
},
postcss: (webpackInstance) => [
require('postcss-import')({ addDependencyTo: webpackInstance }),
require('precss')()
],
plugins: process.env.NODE_ENV === 'production' ?
[
new webpack.LoaderOptionsPlugin({ minimize: false, debug: false }),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
screw_ie8: true,
sequences: true,
dead_code: true,
drop_debugger: true,
comparisons: true,
conditionals: true,
evaluate: true,
booleans: true,
loops: true,
unused: true,
hoist_funs: true,
if_return: true,
join_vars: true,
cascade: true,
drop_console: true
},
output: {
comments: false
}
})
] : []
}