Skip to content

Commit 2658151

Browse files
committed
minor #757 Update 0.29.0 changelog regarding CommonJS imports following the file-loader update (Lyrkan)
This PR was merged into the master branch. Discussion ---------- Update 0.29.0 changelog regarding CommonJS imports following the file-loader update As noted in #743 the file-loader update we did in 0.29.0 has a breaking change when files are imported using the CommonJS syntax. Since the loader is now exporting ES modules by default, importing them with `require(...)` retrieves the whole module and not only the default export. We'll also have to update the Github changelog after merging this (closes #743). Commits ------- 1be64f3 Update 0.29.0 changelog regarding CommonJS imports following the file-loader update
2 parents ca61eea + 1be64f3 commit 2658151

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919

2020
* `file-loader` upgraded from 1.1 to 6 - #731 thanks to @weaverryan.
2121
[CHANGELOG](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#600-2020-03-17)
22-
Unless you're doing custom configuration, it's unlikely you're affected.
22+
If you are importing images/fonts using the CommonJS syntax (`require('foo.png')`),
23+
you will now need to explicitely retrieve the default export (`require('foo.png').default`)
24+
in order to get the path of the file.
25+
Imports done using the `import` keyword should not be affected.
2326

2427
* `url-loader` upgraded from allowing version 1 or 2 to allowing version 4 - #731 thanks to @weaverryan.
2528
[CHANGELOG](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md#400-2020-03-17)

0 commit comments

Comments
 (0)