Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit 2a18cba

Browse files
committedNov 25, 2019
chore(release): 5.0.0
1 parent 98a6c1d commit 2a18cba

6 files changed

+429
-389
lines changed
 

‎CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ All notable changes to this project will be documented in this file. See [standa
88
### BREAKING CHANGES
99

1010
* minimum required nodejs version is `10.13.0`
11-
* switch to ES modules by default (option `esModules` now is `true` by default)
11+
* rename the `esModules` option to `esModule`
12+
* switch to ES modules by default (the option `esModule` is `true` by default)
1213

1314

1415

‎README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,15 @@ module.exports = {
375375

376376
> ℹ️ If `[0]` is used, it will be replaced by the entire tested string, whereas `[1]` will contain the first capturing parenthesis of your regex and so on...
377377
378-
### `esModules`
378+
### `esModule`
379379

380380
Type: `Boolean`
381381
Default: `false`
382382

383-
By default, `file-loader` generates JS modules that use the CommonJS syntax. However, there are some cases in which using ES2015 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/).
383+
By default, `file-loader` generates JS modules that use the ES modules syntax.
384+
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/).
385+
386+
You can enable a CommonJS module using:
384387

385388
**webpack.config.js**
386389

@@ -394,7 +397,7 @@ module.exports = {
394397
{
395398
loader: 'file-loader',
396399
options: {
397-
esModules: true,
400+
esModule: false,
398401
},
399402
},
400403
],

0 commit comments

Comments
 (0)