Skip to content
This repository has been archived by the owner on Mar 23, 2018. It is now read-only.

Commit

Permalink
use empty-module and ContextReplacementPlugin to exclude moment l…
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Dec 9, 2016
1 parent 16fb975 commit 311dad0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/webpack/index.js
Expand Up @@ -164,6 +164,7 @@ let templateContent = fs.readFileSync(paths.src('index.pug')).toString()
__MOCK__ && (templateContent = templateContent.replace(/\/\/pre /g, ''))

webpackConfig.plugins = [
new webpack.ContextReplacementPlugin(/\.\/locale$/, 'empty-module', false, /js$/),
new webpack.DefinePlugin(globals),
new webpack.LoaderOptionsPlugin({
minimize: __PROD__,
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -80,6 +80,7 @@
"cssnano": "^3.8.1",
"debug": "^2.3.3",
"del": "^2.2.2",
"empty-module": "^0.0.2",
"eslint": "^3.11.1",
"eslint-config-standard": "^6.2.1",
"eslint-friendly-formatter": "^2.0.6",
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Expand Up @@ -2426,6 +2426,10 @@ emojis-list@^2.0.0:
version "2.1.0"
resolved "http://registry.npm.taobao.org/emojis-list/download/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"

empty-module@^0.0.2:
version "0.0.2"
resolved "http://registry.npm.taobao.org/empty-module/download/empty-module-0.0.2.tgz#13b4dd8d4afeddd35e50c18dcd788c51087f1545"

encodeurl@~1.0.1:
version "1.0.1"
resolved "http://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20"
Expand Down

0 comments on commit 311dad0

Please sign in to comment.