如何调试CSS优化警告

如何调试CSS优化警告

CSS 优化错误非常罕见。它们通常是由使用了 Framer 私有 API 的自定义代码组件引起的。在极少数情况下,可能表明 Framer 存在漏洞。

2025 年 8 月至 9 月,Framer 推出了新的 CSS 优化器。此优化器与某些旧版本的组件不兼容,例如来自 Framer 的 Vimeo 和代码块组件。所有当前的 Framer 组件均兼容新的 CSS 优化器。

如果您看到以下错误:

There was an error optimizing CSS, which means the affected pages might be slower to load.

Unexpected token Function("var")
There was an error optimizing CSS, which means the affected pages might be slower to load.

Unexpected token Function("var")
There was an error optimizing CSS, which means the affected pages might be slower to load.

Unexpected token Function("var")

Create a free website with Framer, the website builder loved by startups, designers and agencies.