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: create virtual module for middleware #7132

Merged
merged 1 commit into from
May 19, 2023

Conversation

ematipico
Copy link
Member

Changes

This PR creates a new vite plugin for the middleware. This plugin is in charge of creating a new virtual module that yields the code of the middleware.

This is an internal change and the current behaviour should stay the same.

This plugin is going to be helpful in the near future for:

  • integrations that want to pull the code of the Astro middleware in their middleware pipeline
  • a future refactor of how Astro pages will be compiled

Testing

Current tests should pass.

I tested locally if the middleware still works in a pet project of mine.

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented May 19, 2023

🦋 Changeset detected

Latest commit: 5a66a1d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label May 19, 2023
@ematipico ematipico force-pushed the refactor/middleware-plugin branch from 29d1b20 to 5a66a1d Compare May 19, 2023 12:40
@ematipico ematipico merged commit 319a0a7 into main May 19, 2023
@ematipico ematipico deleted the refactor/middleware-plugin branch May 19, 2023 12:51
@astrobot-houston astrobot-houston mentioned this pull request May 19, 2023
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