Integrations ordering #1203
florian-lefebvre
started this conversation in
Proposal
Replies: 2 comments 9 replies
-
I guess the other option might be a hook for adapters to use when all integrations have done creating assets? Are there other use cases we've seen apart from this Vercel one? |
Beta Was this translation helpful? Give feedback.
7 replies
-
The introduction of more control doesn't solve the problem though, right? There's no guarantee that a specific integration runs last |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Summary
Allow integrations to have more control over ordering.
Background & Motivation
The vercel integration copies static assets at the of the build. If some files are added after it, those assets will not be copied. This is problematic in more advanced scenarios where integrations are injected from another etc. Ideally, the vercel integration would inject an integration marked as
post
which would ensure it runs at the end.Goals
Example
We could follow vite's API by adding a new top level property to integrations:
Another option would be to call this option
order
to be consistent withaddMiddleware
.Such a change should be backward compatible, Astro versions that do not support order will just add integrations as they come
Beta Was this translation helpful? Give feedback.
All reactions