lukeed / svelte-demo

Multi-page demo built Svelte 3.x and Rollup with code-splitting
MIT License
114 stars 19 forks source link

lazy loaded components get reloaded on every route change #3

Closed burner closed 5 years ago

burner commented 5 years ago

I think the title says it all. I'm not sure but I believe the router should cache what he has loaded.

btw. Nice work!

lukeed commented 5 years ago

Hey, thanks

What do you mean exactly? I'm running through this demo and all chunk-*.js files are never loaded more than once. Those are the actual components.

The *.json calls for Articles are happening twice per Article sometimes, but that's being discussed in #2 and in some sveltejs issues. Seems to be a recent regression, which I can fix locally here in this repo fairly easily but don't think should need to.

burner commented 5 years ago

I believe I spoke to soon. After rerunning it it disappeared. Sorry for the noise.

lukeed commented 5 years ago

Not a problem! Better safe than sorry~