Skip to content

Conversation

@ematipico
Copy link
Member

Changes

This refactors the dev server to use an entrypoint to load the application.

Testing

The minimal example works, the react example works.

Docs

@changeset-bot
Copy link

changeset-bot bot commented Sep 9, 2025

⚠️ No Changeset found

Latest commit: e5fb82d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Sep 9, 2025
@ematipico ematipico changed the title refactor: use environments to load modules (#14191) refactor(dev): use entry point to bootstrap the app Sep 9, 2025
const { handler } = await createExports.default(settings, controller, loader);

/** rebuild the route cache + manifest */
async function rebuildManifest(path: string | null = null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Will the routes still get updated?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we have the code I just deleted in the vite plugin. And I tested it before opening the PR


return {
handler(incomingRequest: http.IncomingMessage, incomingResponse: http.ServerResponse) {
app.handleRequest({
Copy link
Member

Choose a reason for hiding this comment

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

Should this return?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. The code we removed doesn't return anything. We keep the same logic

@ematipico ematipico merged commit 43b3ed5 into feat/environment-api Sep 9, 2025
6 of 19 checks passed
@ematipico ematipico deleted the env-api/entrypoint branch September 9, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants