mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
fix(@astrojs/vercel): warn user when functionPerRoute
is true
(#8319)
This commit is contained in:
parent
1efd51fb47
commit
dc29e0f797
2 changed files with 11 additions and 1 deletions
5
.changeset/thirty-bees-check.md
Normal file
5
.changeset/thirty-bees-check.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/vercel': patch
|
||||
---
|
||||
|
||||
Add warning when `functionPerRoute` is set to `true`
|
|
@ -129,7 +129,12 @@ export default function vercelServerless({
|
|||
...getImageConfig(imageService, imagesConfig, command),
|
||||
});
|
||||
},
|
||||
'astro:config:done': ({ setAdapter, config }) => {
|
||||
'astro:config:done': ({ setAdapter, config, logger }) => {
|
||||
if (functionPerRoute === true) {
|
||||
logger.warn(
|
||||
"The Vercel plans might have limits to the number of functions you can create, make sure to check them if you don't want to incur into additional costs."
|
||||
);
|
||||
}
|
||||
setAdapter(getAdapter({ functionPerRoute, edgeMiddleware }));
|
||||
_config = config;
|
||||
buildTempFolder = config.build.server;
|
||||
|
|
Loading…
Reference in a new issue