From 519aa2f59eeaebfcb9c872649166cec0d027d93f Mon Sep 17 00:00:00 2001 From: Haishan Date: Wed, 12 Jun 2019 19:49:11 +0800 Subject: [PATCH] build: ignore locales in moment note: chart.js requires moment --- webpack.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index d7e29ba..c832259 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -142,6 +142,9 @@ const plugins = [ definePlugin, new CopyPlugin([{ from: 'assets/*', flatten: true }]), new CleanWebpackPlugin(), + // chart.js requires moment + // and we don't need locale stuff in moment + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), isDev ? false : new webpack.HashedModuleIdsPlugin(), isDev ? false : cssExtractPlugin, isDev ? false : bundleAnalyzerPlugin