You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested on the example provided in the issue. Couldn't figure out yet how to test on a smaller project. I might merge it without a test for now to fix the regression.
I'm running into what I believe is a similar issue to #9685 when building my application with vite using pnpm >=10.12.2.
In this example below, a package in my pnpm workspace has @react-dnd/invariant as a dependency because one of my package's dependencies did not add it as a peer dependency. This was working up until the changes made in 10.12.2. now I have to use vite's build.rollupOptions.external option to get it to build.
> vite build
vite v6.3.5 building for production...
# ...
error during build:
[vite]: Rollup failed to resolve import "@react-dnd/invariant" from "/app/node_modules/.pnpm/react-dnd@11.1.3_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/react-dnd/dist/esm/hooks/useDrag.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
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
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.
close #9685