0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

feat(vercel): Edge improvements (#5086)

* Added error on "output" == "static"

* Minify output

* Changeset
This commit is contained in:
Juan Martín Seery 2022-10-14 17:17:13 -03:00 committed by GitHub
parent facd52a489
commit bd03ddb1fd

View file

@ -39,6 +39,13 @@ export default function vercelEdge(): AstroIntegration {
_config = config;
serverEntry = config.build.serverEntry;
functionFolder = config.build.server;
if (config.output === 'static') {
throw new Error(`
[@astrojs/vercel] \`output: "server"\` is required to use the edge adapter.
`);
}
},
'astro:build:start': ({ buildConfig }) => {
if (needsBuildConfig) {
@ -66,6 +73,9 @@ export default function vercelEdge(): AstroIntegration {
target: 'webworker',
noExternal: true,
};
vite.build ||= {};
vite.build.minify = true;
}
},
'astro:build:done': async ({ routes }) => {