Skip to content

Commit

Permalink
feat: support ignoreMoment
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Oct 31, 2017
1 parent 2e24b68 commit aa45037
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ export function getCommonPlugins({ config, paths, appBuild, NODE_ENV }) {
},
]));
}

if (config.multipage) {
// Support hash
const name = config.hash ? 'common.[hash]' : 'common';
Expand All @@ -316,6 +317,10 @@ export function getCommonPlugins({ config, paths, appBuild, NODE_ENV }) {
}));
}

if (config.ignoreMoment) {
ret.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));
}

ret.push(new webpack.LoaderOptionsPlugin({
options: {
context: __dirname,
Expand Down

0 comments on commit aa45037

Please sign in to comment.