-
Notifications
You must be signed in to change notification settings - Fork 510
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
feat(cloudflare-pages): improve cloudflare-pages adaptor to use dynamic imports #1531
feat(cloudflare-pages): improve cloudflare-pages adaptor to use dynamic imports #1531
Conversation
I'll tag this as pending until cloudflare/workers-sdk#3707 is merged ππ½ |
β Live Preview ready!
|
Thanks for the PR and followups dear @dario-piotrowicz β€οΈ I have merged your work into #1172 from @danielroe to track both module and pages enabling from one place. |
Hi @pi0 I did open this PR separately because the pages dynamic imports should be available very soon (after Unfortunately I don't have an ETA as to when this is going to be available for workers. So I was hoping that we could start using dynamic imports in the pages adaptor now and then do that in the module worker adaptor whenever possible. If you believe that the two adaptors should be updated simultaneously I understand π |
Oh, thanks for the explanations wasn't aware of separate roadmaps. I can happily reopen here to speed it up or merge daniel's PR via an opt-in futuristic flag to make sure nitro is readt already (and somehow locally tested). Also BTW we have an UnJS discord channel for team communications. Would you be interested to join? (please DM me at pi0) |
@pi0 just pinged you on discord π Regarding Pages and Workers having different roadmaps (or more specifically just slightly different implementations/issues), sorry my bad for not mentioning anything in the PR's description π Regarding this PR vs merging Daniel's I'm fine with whatever you prefer π (as long as we don't break the Workers adaptor naturally), although we can't test the lazy loading worker adaptor right now and be sure that it is actually fully ready (since there's not yet a wrangler built which fixes the workers' lazy loading issue), so if we were to go with Daniel's PR there might still be a small chance that things will still need to be tweaked later on (which again, it's not terrible and I'd be fine with if that's an acceptable situation). |
β Type of change
π Description
Update the Cloudflare Pages to use dynamic imports instead of bundling all the js into a single
_worker.js
file, this should make the adapter more performant and potentially reduce startup timeπ Checklist