Skip to content

Commit

Permalink
chore: add esModule false for mini-css-extract-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
SoloJiang committed Nov 10, 2020
1 parent 2f1dbb5 commit 23dc5a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/rax-webpack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rax-webpack-config",
"version": "1.0.0",
"version": "1.0.1",
"description": "rax base webpack config",
"license": "BSD-3-Clause",
"main": "src/index.js",
Expand All @@ -19,7 +19,7 @@
"babel-runtime-jsx-plus": "^0.1.3",
"case-sensitive-paths-webpack-plugin": "^2.3.0",
"css-hot-loader": "^1.4.4",
"css-loader": "^3.2.0",
"css-loader": "^3.0.0",
"file-loader": "^5.0.2",
"identity-obj-proxy": "^3.0.0",
"image-source-loader": "^0.6.5",
Expand All @@ -39,8 +39,7 @@
"webpack-chain": "^6.5.1",
"webpack-filter-warnings-plugin": "^1.2.1",
"webpack-node-externals": "^1.7.2",
"webpack-simple-progress-plugin": "^0.0.4",
"webpack-sources": "^1.4.3",
"mini-css-extract-plugin": "^0.11.2"
"mini-css-extract-plugin": "^1.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/rax-webpack-config/src/setWebpackLoaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const configCSSRule = (config, style, mode, loaders = [], target) => {
rule
.use('MiniCssExtractPlugin.loader')
.loader(MiniCssExtractPlugin.loader)
.options({
esModule: false
})
.end()
.use('css-loader')
.loader(require.resolve('css-loader'))
Expand Down

0 comments on commit 23dc5a9

Please sign in to comment.