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
Errors Thrown When Two Nested Modules Import the Same Module #634
Comments
Interesting, this isn't anything special, I must have done this in several of my extensions... I haven't tried out your repro yet, but I will soon. Thanks for the report |
Ahh, OK. This is happening during the build, not at runtime. Currently, entrypoints are loaded with For now, I'd just not use I'm gonna add this issue to #506 and mark this as a duplicate, it should be fixed once we use vite to load the entrypoint options instead of |
Describe the bug
There are three modules involved:
a.ts
references bothb.ts
andc.ts
, whereasb.ts
referencesc.ts
. All of them utilize a module import syntax similar toimport * as x from "@/modules/x"
.a.ts:
b.ts:
c.ts:
At this point, import it in a certain file (for example, background.ts) will result in an error being thrown:
If I remove the import in the background before starting the dev server, and then add it back after the server has started, it does not throw an error.
I am sure the path is correct because
import {a} from "@/modules/a"
works.To Reproduce
demo.zip
Steps to reproduce the bug using the reproduction:
npm i
npm run dev
Expected behavior
no error
Environment
The text was updated successfully, but these errors were encountered: