This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
How do you guys handle circular imports, with vue-router? #534
Labels
You can continue the conversation there. Go to discussion →
Uh oh!
There was an error while loading. Please reload this page.
Related plugins
plugin-vue
plugin-vue-jsx
Describe the bug
I’m confused. After installing vite-plugin-circular-dependency, I noticed a lot of circular dependencies.
I did this because I was facing
Cannot access '...' before initialization
errors, I know this is because circular dependencies problem, so I installed the plugin.I think some modules rely on the router for navigation, but the router typically has many modules, and these modules define paths. Paths, in turn, import Vue pages, which contain a lot of logic. It’s quite normal for the page to depend on some modules, and for those modules to rely on the router, to get currentRoute or navigation.
Reproduction
https://github.com/latel/vite-circular-dependencies-router
Steps to reproduce
pnpm i
pnpm build
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: