From 6fff9ee30967ce029f6ae173f4771cd98a676301 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Sat, 17 Dec 2022 23:31:53 -0500 Subject: [PATCH] Docs: Fix `prerender` error message (#5626) * fix: update prerender message * fix: update prerender description * fix: remove escapes * Update packages/astro/src/core/errors/errors-data.ts Co-authored-by: Sarah Rainsberger Co-authored-by: Nate Moore Co-authored-by: Sarah Rainsberger --- packages/astro/src/core/errors/errors-data.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/astro/src/core/errors/errors-data.ts b/packages/astro/src/core/errors/errors-data.ts index c866d29ab..bd0135f55 100644 --- a/packages/astro/src/core/errors/errors-data.ts +++ b/packages/astro/src/core/errors/errors-data.ts @@ -397,8 +397,11 @@ See https://docs.astro.build/en/guides/server-side-rendering/ for more informati }, /** * @docs + * @message + * **Example error messages:**
+ * InvalidPrerenderExport: A `prerender` export has been detected, but its value cannot be statically analyzed. * @description - * A `prerender` export was detected, but the value was not statically analyzable. Values computed at runtime are not supported, so `export const prerender` can only be set to `true` or `false`. Variables are not supported. + * The `prerender` feature only supports a subset of valid JavaScript — be sure to use exactly `export const prerender = true` so that our compiler can detect this directive at build time. Variables, `let`, and `var` declarations are not supported. */ InvalidPrerenderExport: { title: 'Invalid prerender export.',