fix(remix-dev): require.resolve isolateChunks for pnpm - #5637
Merged
Merged
Conversation
react-refresh is a dependency of remix-dev, not of your app. so we can use require.resolve to find it. This fixes an issue where remix-dev would not work with pnpm. see pnpm/pnpm#2957 (comment) for a similar issue in CRAv4 and how they fixed it there https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/230/files Signed-off-by: Logan McAnsh <logan@mcan.sh>
🦋 Changeset detectedLatest commit: db5f644 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
mcansh
commented
Mar 2, 2023
| "react-dom", | ||
| "react-dom/client", | ||
| "react-refresh/runtime", | ||
| require.resolve("react-refresh/runtime"), |
Contributor
Author
There was a problem hiding this comment.
other packages listed are installed in the user's app already, so we shouldn't need to resolve them
Contributor
Author
There was a problem hiding this comment.
did it anyway to be consistent and safe
require.resolve react-refresh for pnpm
Signed-off-by: Logan McAnsh <logan@mcan.sh>
MichaelDeBoey
approved these changes
Mar 8, 2023
require.resolve react-refresh for pnpmrequire.resolve isolateChunks for pnpm
mcansh
force-pushed
the
logan/react-refresh-pnpm
branch
from
March 15, 2023 14:48
afd65be to
db5f644
Compare
brophdawg11
approved these changes
Mar 15, 2023
Contributor
|
🤖 Hello there, We just published version Thanks! |
1 task
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
react-refreshis a dependency of@remix-run/dev, not of your app so it's not "hoisted" to node_modules.so we can use require.resolve to find it. This fixes an issue where remix-dev would not work with pnpm.
see pnpm/pnpm#2957 (comment) for a similar issue in CRAv4 and how they fixed it there https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/230/files
confirmed working: https://twitter.com/jplhomer/status/1631375544263516180
closes #5811
Closes: #
Testing Strategy: