
创建项目
你将得到什么
与 React 相同的组件模型,但只有 3kB 的运行时,并配置了标准的preact/compat 别名,让大多数 React 库可以继续工作。当你关心打包体积时,这是一个不错的选择,尤其适用于注入到他人页面中的 content script。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
🎉 Extension.js v3.0.0 is here — faster builds, Firefox MV3, and first-class TypeScript.
用与 React 兼容的 API、3kB 运行时脚手架生成一个 Preact 浏览器扩展,专为对体积敏感的 popup 与 content script 调优。

npx extension@latest create my-extension --template=preact
preact/compat 别名,让大多数 React 库可以继续工作。当你关心打包体积时,这是一个不错的选择,尤其适用于注入到他人页面中的 content script。
此页面对您有帮助吗?
