Ignore moment.js locales for smaller build
This commit is contained in:
parent
7c8fc72f49
commit
c6e03b15c7
|
@ -1,6 +1,11 @@
|
||||||
|
|
||||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||||
let plugins = []
|
const webpack = require('webpack');
|
||||||
|
|
||||||
|
let plugins = [
|
||||||
|
// do not include moment.js locales since it's quite heavy
|
||||||
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||||
|
]
|
||||||
if (process.env.BUNDLE_ANALYZE === '1') {
|
if (process.env.BUNDLE_ANALYZE === '1') {
|
||||||
plugins.push(new BundleAnalyzerPlugin())
|
plugins.push(new BundleAnalyzerPlugin())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue