Local and transitive dependencies resolved into different "instances" in dev mode #7708
Open
7 tasks done
Labels
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
isluxon@1.28.0
anddep-b
iscron-parser@4.3.0"
.I think this is a regression in 2.9.0:
vite@2.9.1: example: different behaviour in prod and dev mode
vite@2.8.6: 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: