Closed ematipico closed 1 month ago
Latest commit: dd0ada5ea84f7855a9854e5e0958da636612ebc5
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
Does this require changes in astro add
?
Does this require changes in
astro add
?
Good call. Yes, it will. I will make a PR
Changes
Closes PLT-2550
This PR refactors the code of the Vercel adapter, and it now exports one single entry point for both static and serverless adapter.
The new code is inside
index.ts
. The code that differs between the new adapters is conditionally applied usingif (buidOutput === "server")
all over.Also, I took the opportunity to make the creation of the
config.json
a bit more readable with a classicif/else
, all those big ternaries were a bit hard to handle.Testing
The current tests should pass.
I only updated one single test, where Astro was throwing an error for an incorrect configuration.
Docs
https://github.com/withastro/docs/pull/9755