Local and transitive dependencies resolved into different "instances" in dev mode #7708
Closed
7 tasks done
Labels
inconsistency
Inconsistency between dev & build
p2-edge-case
Bug, but has workaround or limited in scope (priority)
Describe the bug
Take the following dependency structure:
dep-a
should resolve to the same "instance" whether I access it directly (import depA from 'dep-a'
) or indirectly viadep-b
(e.g when it re-exports members fromdep-a
or returns adep-a
object, etc).In dev mode this does not seem to be the case. I got back two separate "instances" from the same package, with the same version.
See the attached example where
dep-a
is[email protected]
anddep-b
is[email protected]"
.I think this is a regression in 2.9.0:
[email protected]: example: different behaviour in prod and dev mode
[email protected]: example: works as expected
Luxon resolves to the same version (
yarn why luxon
):Reproduction
https://stackblitz.com/edit/vitejs-vite-n3tocb?file=package.json
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: