From b3e5f7c6695bbd9f9dee68d744c6f5dce63f23e1 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Fri, 22 Jun 2018 09:36:34 +0200 Subject: [PATCH] perf(bundle-size): only en locale from moment Shaves 136.63k of final renderer.prod.js bundle size. --- webpack.config.base.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webpack.config.base.js b/webpack.config.base.js index e6cc26ea..3c546568 100644 --- a/webpack.config.base.js +++ b/webpack.config.base.js @@ -3,6 +3,7 @@ */ import path from 'path' +import { IgnorePlugin } from 'webpack' import { dependencies as externals } from './app/package.json' export default { @@ -38,6 +39,8 @@ export default { modules: [path.join(__dirname, 'app'), 'node_modules'] }, + plugins: [new IgnorePlugin(/^\.\/locale$/, /moment$/)], + optimization: { namedModules: true }