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
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.
src/handlers/exchange-status-handler.ts
src/handlers/exchange-status-handler.ts ( actually it's using router.push api ) -> src/router/index.ts -> src/router/modules/transfer.ts -> src/views/transfer/transfer-status.vue -> src/handlers/exchange-status-handler.ts
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.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
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: