You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+29
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,7 @@ module.exports = {
118
118
|**[`importLoaders`](#importloaders)**|`{Number}`|`0`| Enables/Disables or setups number of loaders applied before CSS loader |
119
119
|**[`localsConvention`](#localsconvention)**|`{String}`|`'asIs'`| Style of exported classnames |
120
120
|**[`onlyLocals`](#onlylocals)**|`{Boolean}`|`false`| Export only locals |
121
+
|**[`esModule`](#esmodule)**|`{Boolean}`|`false`| Use ES modules syntax |
121
122
122
123
### `url`
123
124
@@ -857,6 +858,34 @@ module.exports = {
857
858
};
858
859
```
859
860
861
+
### `esModule`
862
+
863
+
Type: `Boolean`
864
+
Default: `false`
865
+
866
+
By default, `css-loader` generates JS modules that use the CommonJS modules syntax.
867
+
There are some cases in which using ES modules is beneficial, like in the case of [module concatenation](https://webpack.js.org/plugins/module-concatenation-plugin/) and [tree shaking](https://webpack.js.org/guides/tree-shaking/).
0 commit comments