预渲染导出无效。
示例错误消息:
InvalidPrerenderExport:已检测到prerender
导出,但无法静态分析其值。¥Example error messages:
InvalidPrerenderExport: Aprerender
export has been detected, but its value cannot be statically analyzed.
什么地方出了错?
Section titled 什么地方出了错?¥What went wrong?
prerender
功能仅支持有效 JavaScript 的子集 — 请务必使用 export const prerender = true
,以便我们的编译器可以在构建时检测到此指令。不支持变量、let
和 var
声明。
¥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.