Remove circular dependency
Closed this issue · 9 comments
Circular dependency: src/node_modules/@sapper/app.mjs -> src/node_modules/@sapper/internal/App.svelte -> src/routes/_layout.svelte -> src/node_modules/@sapper/app.mjs
We should fix this. _layout
doesn't need to depend on the whole app. Only on the stores
for example. We could refactor out the stores
such that the layout and app can both import them independently without the need for this circular dependency
You mentioned this results in a warning. Where can I see this warning?
It's been silenced in the Rollup config, so you would need to remove that: https://github.com/sveltejs/sapper-template/blob/b756d9df6157bb13611e53627ddeecd440432121/rollup.config.js#L16
@benmccann it didn't work
I'm not going to fix this. Focusing on SvelteKit now which replaces Sapper
@benmccann How ready is sveltekit so far? to handle routing, ssr etc ?
Yes, it does that already
do you recommend using sveltekit then for a large ecommerce project, or sapper is more stable so far?
SvelteKit had more functionality and better development experience. It is more likely to introduce bugs or API changes though if you lock to a working version hopefully you can address those in your own time. There's also the question of whether you'd want to start a new project in Sapper only to migrate later
I understand! so i will keep using sapper, and upgrade later to sveltekit.
i'm sure the process will be easy!