Skip to content

Commit

Permalink
fix(module): lazy-require moment-locales-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 31, 2019
1 parent b22d9c4 commit 7c2ed2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.js
@@ -1,5 +1,4 @@
const { resolve } = require('path')
const MomentLocalesPlugin = require('moment-locales-webpack-plugin')

const defaults = {
locales: [],
Expand All @@ -19,6 +18,7 @@ function momentModule (moduleOptions) {
}

this.extendBuild((config) => {
const MomentLocalesPlugin = require('moment-locales-webpack-plugin')
config.plugins.push(new MomentLocalesPlugin({
localesToKeep: options.locales
}))
Expand Down

0 comments on commit 7c2ed2f

Please sign in to comment.