-
-
Notifications
You must be signed in to change notification settings - Fork 432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just needs a little tidy
a1aa284
to
aaf7d17
Compare
Hoping that this will get merged soon 👍 |
965e589
to
5085eb0
Compare
@benmccann does this preloading dependencies feature works for |
If you run the Sapper server, then |
Also interested in whether the preloading will work in |
I answered the question with all information I have about it just above: #1269 (comment) |
I think I know why it's not working for I don't use |
@benmccann is it just about adding that line eg changing it to modulepreload? I‘d love to contribute if I‘m able |
You'd want to support both, so I'd imagine the fix looks like this:
The main thing here is testing out the fix and making sure it works |
I'm not sure what you're suggesting. routify.dev is built with Routify and not Sapper, so I'm not really sure how it's related. For comparison, Sapper sites score very highly on Google's Page Speed score. E.g. https://realworld.svelte.dev/ which is built with Sapper scores in the 90s. |
@benmccann sorry, I posted in the wrong thread. I moved the comment but notifications must've gone through anyway. My apologies. You should have the other one too I believe |
@benmccann I've submitted a PR #1539 when you find some time I'd be thankful if you could review. Thanks! |
Closes #1260
Closes #408
Closes #440
Closes #712
Closes #449
Closes #405
Closes #70
I made a small library to extract the dependency tree from the Rollup
OutputChunk[]
. If you're okay with it being added a dependency here then I can go ahead and publish it tonpm
. By having it as an external project other projects can use it as well. Also, it made it easier to test because I wrote a test that operates on a JSON dump of a Rollup compilation result. Importing JSON in a test was kind of tricky and I had more control over changing settings for tsconfig, mocha, etc. in an external project to make that workI ran this with
npm link
in the realworld project with Chrome set to emulate a slow 3g connection and it makes a big difference. You can see the JS files for the current page being loaded in parallel in the network tab instead of sequentially.This PR
Current Deployed Real World Sample