This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: name of
esModule
option in source code (#346)
- Loading branch information
1 parent
2a18cba
commit 31d6589
Showing
5 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`"esModule" option should work with "Boolean" value equal "false": errors 1`] = `Array []`; | ||
|
||
exports[`"esModule" option should work with "Boolean" value equal "false": result 1`] = `"9c87cbf3ba33126ffd25ae7f2f6bbafb.png"`; | ||
|
||
exports[`"esModule" option should work with "Boolean" value equal "false": warnings 1`] = `Array []`; | ||
|
||
exports[`"esModule" option should work with "Boolean" value equal "true": errors 1`] = `Array []`; | ||
|
||
exports[`"esModule" option should work with "Boolean" value equal "true": result 1`] = `"9c87cbf3ba33126ffd25ae7f2f6bbafb.png"`; | ||
|
||
exports[`"esModule" option should work with "Boolean" value equal "true": warnings 1`] = `Array []`; | ||
|
||
exports[`"esModule" option should work without value: errors 1`] = `Array []`; | ||
|
||
exports[`"esModule" option should work without value: result 1`] = `"9c87cbf3ba33126ffd25ae7f2f6bbafb.png"`; | ||
|
||
exports[`"esModule" option should work without value: warnings 1`] = `Array []`; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31d6589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting from this commit and with
file-loader
5.0.1 and 5.0.2 (but not 5.0.0) I get the "error" from #212I don't understand why this happens, but guess it's related to the evaluation of the default value. Unfortunately I don't have any isolated example yet.
When I I explicitly set the option
esModule
tofalse
it works.31d6589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update css-loader to latest version
31d6589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the quick reply.
Some days ago I updated to
"css-loader": "3.4.1"
but with the newest release3.4.2
AND withoutesModule: false
it doesn't work either.In my concrete case it is an image resource that doesn't work, so
file-loader
seems to be the relevant loader.31d6589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is happens, maybe you can provide a screenshot?
31d6589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I continued to search for similar problems and found [1]. According to [2]
esModule is true by default
starting with version 5.0.0.Could it be, that this (breaking change) didn't work in 5.0.0 and has been fixed with 5.0.1? According to [3] this was just a rename from
esModules
toesModule
.[1] https://stackoverflow.com/questions/59114479/when-i-using-file-loader-and-html-loader-in-webpack-the-src-attr-of-image-gonna
[2] https://github.com/webpack-contrib/file-loader/releases/tag/v5.0.0
[3] #346
31d6589
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem in html-loader, and will be fixed in next html-loader release, 5.0.1 just fix due typo in source code