mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 09:59:18 +02:00
Ignore moment.js locales for smaller build
This commit is contained in:
parent
7c8fc72f49
commit
c6e03b15c7
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue