From b71c694cf15a36bf59337b144aeddeb5622948dd Mon Sep 17 00:00:00 2001 From: JuanM04 Date: Mon, 18 Apr 2022 19:00:13 -0300 Subject: [PATCH 1/3] Added warning in buildtime --- packages/integrations/vercel/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/integrations/vercel/src/index.ts b/packages/integrations/vercel/src/index.ts index 6c353a93dbee..439eeeb04ce2 100644 --- a/packages/integrations/vercel/src/index.ts +++ b/packages/integrations/vercel/src/index.ts @@ -53,6 +53,12 @@ export default function vercel(): AstroIntegration { buildConfig.serverEntry = `${ENTRYFILE}.js`; buildConfig.client = new URL('./static/', _config.outDir); buildConfig.server = new URL('./server/pages/', _config.outDir); + + if (String(process.env.ENABLE_FILE_SYSTEM_API) !== '1') { + console.warn( + `The enviroment variable "ENABLE_FILE_SYSTEM_API" was not found. Make sure you have it set to "1" in your Vercel project.\nLearn how to set enviroment variables here: https://vercel.com/docs/concepts/projects/environment-variables` + ); + } }, 'astro:build:done': async ({ routes }) => { // Bundle dependecies From 79f35210824e4c9732ed7eed2800550161268d5c Mon Sep 17 00:00:00 2001 From: JuanM04 Date: Mon, 18 Apr 2022 19:01:13 -0300 Subject: [PATCH 2/3] Updated readme --- packages/integrations/vercel/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integrations/vercel/README.md b/packages/integrations/vercel/README.md index 7b8aae035f0a..4b63aed0185b 100644 --- a/packages/integrations/vercel/README.md +++ b/packages/integrations/vercel/README.md @@ -13,7 +13,7 @@ export default defineConfig({ }); ``` -After you build your site the `.output/` folder will contain your server-side rendered app. Since this feature is still in beta, you'll **need to add this Enviroment Variable to your Vercel project**: `ENABLE_FILE_SYSTEM_API=1` +After you build your site the `.output/` folder will contain your server-side rendered app. Since this feature is still in beta, you'll **need to add this Enviroment Variable to your Vercel project**: `ENABLE_FILE_SYSTEM_API=1`. [Learn how to set enviroment variables](https://vercel.com/docs/concepts/projects/environment-variables). Now you can deploy! From 9a48a53c3d0eac8743dfb7dbd6e47992870d2b35 Mon Sep 17 00:00:00 2001 From: JuanM04 Date: Mon, 18 Apr 2022 19:01:42 -0300 Subject: [PATCH 3/3] Changeset --- .changeset/soft-fishes-switch.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/soft-fishes-switch.md diff --git a/.changeset/soft-fishes-switch.md b/.changeset/soft-fishes-switch.md new file mode 100644 index 000000000000..bd64852e806c --- /dev/null +++ b/.changeset/soft-fishes-switch.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': patch +--- + +Added warning when `ENABLE_FILE_SYSTEM_API` is not found