
建立專案
你會獲得什麼
與 React 相同的元件模型,但只需 3kB runtime;範本已用標準的preact/compat alias 設定好,大多數 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 runtime 上建立 Preact 瀏覽器擴充功能,特別適合對體積敏感的 popup 與 content script。

npx extension@latest create my-extension --template=preact
preact/compat alias 設定好,大多數 React 函式庫仍可正常運作。當打包體積重要時,例如要注入別人頁面的 content script,這是合適的選擇。
這個頁面有幫助嗎?
