Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Preload assets in Rollup apps - fixes #408 #440

Closed
wants to merge 1 commit into from
Closed

Preload assets in Rollup apps - fixes #408 #440

wants to merge 1 commit into from

Conversation

nsivertsen
Copy link
Contributor

@nsivertsen nsivertsen commented Sep 13, 2018

I'm not sure if the way I'm testing whether a chunk is a page is 100% right, see RollupResult.ts, lines 47-48.

Fixes #408

} else {
Object.keys(chunk.modules).forEach((module: string) => {
if (!module.startsWith(routes_dir)) return;
if (/\.css$/.test(module)) return;
Copy link
Contributor Author

@nsivertsen nsivertsen Sep 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether these checks are the best way to detect whether a chunk is a page.

@Rich-Harris
Copy link
Member

Gah, sorry for letting this PR fester. Tried to merge it just now but master has diverged too far; had a quick go at resolving the conflict but was a bit of a rabbit hole. Might be easier for us to take another run at this after the Svelte 3 changes are in

@benmccann
Copy link
Member

@nsivertsen is this something you'd still be interested in pursuing? I know it's been awhile, but any chance you'd be able to rebase it?

@nsivertsen
Copy link
Contributor Author

@benmccann hi! I would be, however I'm quite swamped at the moment so it would be a couple weeks before I could look into it. If you have time sooner, feel free to take a stab at it!

As both Sapper and Rollup have gone through a fair amount of changes in the meantime, there might be a better way of doing this, so it could be worth looking at this with fresh eyes.

@benmccann
Copy link
Member

No worries. We can wait for whenever you get a chance

@benmccann
Copy link
Member

benmccann commented Jul 16, 2020

I've sent #1269 which is rebased against master and handles all transitive JS dependencies as well as CSS files

@antony
Copy link
Member

antony commented Jul 29, 2020

Closing in favour of #1269

@antony antony closed this Jul 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preloading assets in Rollup apps
4 participants