From e9f553dede453d8b3ee88f5e1291c7e6c6cf9188 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 4 Jul 2020 21:57:35 -0700 Subject: [PATCH] Reduce chart bundle size --- webpack.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 0b2bd503..ddef4d9a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -66,6 +66,11 @@ module.exports = { }, symlinks: false, }, + externals: { + // Mark moment as an external to exclude it from the Chart.js build since we don't need to use + // it for anything. + moment: 'moment', + }, plugins: [ new AssetsManifestPlugin({ writeToDisk: true, publicPath: true, integrity: true, integrityHashes: ['sha384'] }), !isProduction ? new ForkTsCheckerWebpackPlugin({