Back to Withastro

Invalid prerender export.

src/content/docs/en/reference/errors/invalid-prerender-export.mdx

latest500 B
Original Source

import DontEditWarning from '~/components/DontEditWarning.astro'

<DontEditWarning />

Example error messages:

InvalidPrerenderExport: A prerender export has been detected, but its value cannot be statically analyzed.

What went wrong?

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.