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:
parent
facd52a489
commit
bd03ddb1fd
1 changed files with 10 additions and 0 deletions
|
@ -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 }) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue