New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gatsby): Normalize module keys between webpack plugin and loader #36644
Conversation
286566b
to
4913bba
Compare
a540d02
to
cf45642
Compare
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.
Oh, windows tests actually caught something:
Error: expect(received).toMatchSnapshot()
Snapshot name: `should normalize bare module imports from node_modules 1`
Snapshot: "file://node_modules/package-name"
Received: "file://Users/username/project/node_modules/package-name"
d8f01e6
to
c1eb721
Compare
Fixed in 8f11802 |
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.
LGTM, had minor NIT but we can just go ahead and merge as-is
projectRoot | ||
) | ||
|
||
expect(normalizedModuleKey).toMatchSnapshot() |
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.
NIT: I'd suggest using .toMatchInlineSnapshot()
here given that output is not large, and that will collocate "expected" value to be here, making it easier to see what assertion is actually being done here (regular snapshot requires looking stuff up in .snap
files etc).
Not big deal, just my preference for this kind of things
Description
Normalize module keys between the partial hydration webpack loader and plugin.
Previously the actual resource path was used, which caused problems because the different modules can be loaded in the loader and plugin based off of what is declared in
package.json
.Documentation
N/A
Related Issues
[sc-55773]