-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
refactor: entrypoint DX #14563
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
refactor: entrypoint DX #14563
Conversation
|
I wonder if the entrypoint should be a virtual module instead, given it loads virtual modules. Wdyt? Eg. |
packages/integrations/cloudflare/test/fixtures/vite-plugin/src/dev.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Matt Kane <[email protected]>
…/dev.ts Co-authored-by: Matt Kane <[email protected]>
Co-authored-by: Matt Kane <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
a968f03
to
1ded870
Compare
I rebased the code on top of The specifier Please let me know if you have a better idea for how to export those functions (different specifiers, different names). |
Changes
This refactors the code by improving the way the cloudflare adapter (and any adapter in the future) and retrieve the
BaseApp
module.It creates a
astro/app/entrypoint
specifier that exposes the new functiongetApp
. This function is responsible for returning an SSR-compatible app based on thedev
parameter.I took the opportunity to rename the virtual modules using the agreed naming convention, which is
virtual:astro:<FEATURE>
. I didn't rename the astro actions because it has already been done in another branch.I also updated the cloudflare dependencies. I didn't update to the latest because some deps were released less than three days ago.
Testing
This refactor was done during TBD, and we all verified that it works.
Docs
N/A