Skip to content
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(build): don't emit middleware.mjs #12479

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Conversation

ematipico
Copy link
Member

Changes

This PR refactors our build by removing the necessity of having a file called middleware.mjs. We were emitting middleware.mjs in order to have a predictable way to load the middleware file; however, since we started emitting the middleware chunk as a virtual module, we were emitting two files: middleware.mjs that simply do an export of onRequest from the middleware chunk.

middleware.mjs isn't needed anymore, and we directly import the chunk that rollup generates after the build.

Testing

This is an internal refactor; existing CI should pass, and no changeset is needed.

Docs

N/A

Copy link

changeset-bot bot commented Nov 19, 2024

⚠️ No Changeset found

Latest commit: 6546bc4

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 Nov 19, 2024
Copy link

codspeed-hq bot commented Nov 19, 2024

CodSpeed Performance Report

Merging #12479 will not alter performance

Comparing refactor/middleware-file (6546bc4) with main (46f6b38)

Summary

✅ 6 untouched benchmarks

@ematipico ematipico merged commit ab0580b into main Nov 20, 2024
15 checks passed
@ematipico ematipico deleted the refactor/middleware-file branch November 20, 2024 11:21
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.

2 participants