whitelisted moment.js locales to reduce bundle size

This commit is contained in:
Alec Merdler 2017-08-02 11:26:36 -04:00
parent 82a08a942e
commit 6dae6c4f82
6 changed files with 13 additions and 19 deletions

View file

@ -17,6 +17,8 @@ let config = {
externals: {
angular: "angular",
jquery: "$",
moment: "moment",
"raven-js": "Raven",
},
module: {
rules: [
@ -47,7 +49,10 @@ let config = {
FileSaver: 'file-saver',
angular: "angular",
$: "jquery",
moment: "moment",
}),
// Restrict the extra locales that moment.js can load; en is always included
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en/),
],
devtool: "cheap-module-source-map",
};