From 591a5135119905b85bba2b4edd75fecd6ffbc0b2 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Sun, 20 Aug 2017 03:55:28 +0200 Subject: [PATCH] Do not pack any moment.js locales except en. --- nwb.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nwb.config.js b/nwb.config.js index a569cf2..6220dd5 100644 --- a/nwb.config.js +++ b/nwb.config.js @@ -1,3 +1,5 @@ +const { ContextReplacementPlugin } = require('webpack'); + module.exports = { type: 'react-app', @@ -67,6 +69,10 @@ module.exports = { }, extra: { + plugins: [ + new ContextReplacementPlugin(/moment[/\\]locale$/, /en\.js/), + ], + resolve: { extensions: [ '.jsx',