-
Notifications
You must be signed in to change notification settings - Fork 88
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
Circular dependency warnings when importing helpers in sub-components #15
Comments
Thought: what if |
Locally what I did was remove all direct imports to the generated routes file in this lib. In my This seems to work well but there's even more optimization that can happen by moving routes into the store module. Then the generated module can import and set the store. |
Thanks for the kind words. I'm considering to add the url helper as a prop instead of having to import it. That would make it context aware and enable URLs that are relational to the current file, rather than the current URL. For instance, currently if you have an admin module with navigational links like "./posts" and "./users". Navigating to My only concern is poluting the props. We already have route, routes and _routerOptions being passed to every page. I'll create a new issue on this. EDIT: |
If you try to import { url } from 'svelte-filerouter'; inside of any sub component of a routed component you get circular dependency warnings due to the way the generated route file works. This makes building components like difficult to do presently. I am filing this issue because honestly I am not sure what the best approach ought to be to avoid this in a clean way.
Sidenote: Awesome project so far!
The text was updated successfully, but these errors were encountered: