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 <sarah@rainsberger.ca>

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
This commit is contained in:
Nate Moore 2022-12-17 23:31:53 -05:00 committed by GitHub
parent 2552816d5f
commit 6fff9ee309
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -397,8 +397,11 @@ See https://docs.astro.build/en/guides/server-side-rendering/ for more informati
},
/**
* @docs
* @message
* **Example error messages:**<br/>
* 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.',