-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Dealing With Circular Dependencies #12
Comments
It probably has nothing to do with vite-plugin-ssr (hence closing this ticket). Give me a full error stack and I'll have a closer look. |
Dear Romuald, Thanks for replying so quickly. I made two repositories showing this example.
(There is also a TypeError logging but nevermind that :)) Thank you so much for looking into this if you have time. We have a lot of such functions and the circular dependencies are crashing everything. Warmest wishes, Lydia |
AFAICT there are only two optoins here. Either you:
It's time consuming but definitely possible to get rid of all cyclic dependency. E.g. the cyclic dependency
is fairly easy to resolve. |
Dear Romuald, Thank you so much for your help and even more so the encouragement/nudge!! I was able to resolve this But, in our code these functions had more than just 'one door', you can call handleObject() in and of itself. Anyway I have surprised myself and managed to work out how to do it!!!! Nevertheless I might hold out for as long as I can for 2258 as this is going to be horrible refactor.... THANK YOU!! |
It’s Not that Bad just Stick to résolve each dependency one by one
…On Sat 20. Mar 2021 at 21:16, LF ***@***.***> wrote:
Dear Romuald,
Thank you so much for your help and even more so the encouragement/nudge!!
I was able to resolve this /comps/index.ts -> /comps/handleObject.js ->
/comps/index.ts using the solution in stack overflow...
But, in our code these functions had more than just 'one door', you can
call handleObject() in and of itself. Anyway I have surprised myself and
managed to work out how to do it!!!!
Nevertheless I might hold out for as long as I can for 2258 as this is
going to be horrible refactor....
THANK YOU!!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVQRSMKIZAXRZM7XGBBX3TET7AXANCNFSM4ZPRDDRQ>
.
|
Dear @brillout,
We are encountering circular dependencies when using recursive functions. I was wondering if this is something to do with vite & ssr, or whether it was perhaps your package. I thought it might be just vite & ssr because there is an issue about it, but I thought it might be your package as all the circular dependencies begin with this:
/Users/home1/code/lt/csvite/node_modules/vite-plugin-ssr/user-files/infra.node.vite-entry.ts -> /src/pages/tests/index.page.tsx -> ...
I tried putting this in vite.config.ts, but it didn't do anything.
Thank you (again!) for any pointers and apologies if this is nothing to do with vite-plugin-ssr!
The text was updated successfully, but these errors were encountered: