-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathwebpack.prod.babel.js
40 lines (37 loc) · 1.11 KB
/
webpack.prod.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
import merge from 'webpack-merge';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import commonConfig from './webpack.common';
const common = commonConfig('production');
export default [
merge(common.assets, {}),
merge(common.patternLibAssets, {}),
merge(common.templates, {}),
merge(common.es2015plus, {
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'static',
defaultSizes: 'gzip',
generateStatsFile: true,
statsFilename: 'es6.stats.json',
reportFilename: 'es6.stats.html',
openAnalyzer: process.env.NODE_ENV === 'development',
excludeAssets: /patternlib.js/
})
]
}),
merge(common.es5, {
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'static',
defaultSizes: 'gzip',
generateStatsFile: true,
statsFilename: 'es5.stats.json',
reportFilename: 'es5.stats.html',
openAnalyzer: process.env.NODE_ENV === 'development',
excludeAssets: /patternlib.es5.js/
})
]
}),
merge(common.es2015plusPatternLib, {}),
merge(common.es5PatternLib, {})
];