whitelisted moment.js locales to reduce bundle size
This commit is contained in:
parent
82a08a942e
commit
6dae6c4f82
6 changed files with 13 additions and 19 deletions
|
@ -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",
|
||||
};
|
||||
|
|
Reference in a new issue