-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make Preact on skypack optional? #106
Comments
Yep, I'm good with this change. I'm not sure if the built-in Skypack CDN behavior will work with Microsite's SSR setup... might be better to just support |
I’ve thought about ways it could work (also tying in with #99), but after so many boondoggles around tests I’m definitely happy to keep it as small and focused as possible for a first start. I doubt I’ll look at it tomorrow, I’m going to yeet myself out to space if I don’t have a meaningful commit on my own site tomorrow. But I’ll be back to this, I definitely want it. |
One more note on this because it’s something I’m tracking on my site: I tried a bunch of stuff locally with the contexts used to gather head/hydration to preload as much as possible and it seems Skypack itself is a bottleneck here. Going local already felt like a good direction given cache partitioning, but to add more flavor here, the Skypack CDN has a pretty much fixed 200-300ms latency and their cache headers don’t do well with even non-force reloads. |
@eyelidlessness Makes sense. I'm taking a look at this now and I'll see where I get. |
OK, you warned me but this was much more involved than I expected. 😅 What the build script does right now is mark There's definitely a way around this, but I think it requires some more thought. I have a feeling v1.2.0 is going to be focused on eliminating the differences between the dev/build scripts, so this should fit nicely into that set of refactoring. |
I’m still in early caffeination stage but this feels like it might be an easy solve by making Preact a dev/peer dependency? That way for users there should only be one version and no mixing |
Unfortunately not, Snowpack bundles Preact into |
Just cross-referencing the fact that in #125, I promised Preact on Skypack would opt-in behavior in v1.2.0.
|
Would you consider making the usage of Skypack CDN URLs for Preact optional? This could potentially be accomplished by removing the mapping logic and deferring to the built in behavior introduced in Snowpack 3.0.
My motivation is that using CDNs for external dependencies is actually increasingly a performance negative, since most browsers now implement cache partitioning.
I spent some time trying to make this change on my fork but it turned out to be fairly involved, and I wanted to check in about whether it would be a welcome change before I get deeper into it.
The text was updated successfully, but these errors were encountered: