Geebarwan
V2EX  ›  问与答

要开发一款 chrome 浏览器插件,偷懒想问下有没有推荐的脚手架或者文档。

  •  
  •   Geebarwan · Jul 19, 2023 · 2190 views
    This topic created in 1221 days ago, the information mentioned may be changed or developed.
    本人主要做后端开发现在遇到需求需要开发一个浏览器插件,想请问有什么推荐的文档之类的吗?或者有没有一些脚手架相关的。
    5 replies  •  2023-07-20 01:46:31 +08:00
    AV1
    AV1
    Jul 19, 2023
    2
    我一直用 chrome 文档官网,不过我觉得不是很好用
    https://developer.chrome.com/docs/extensions/

    MDN 也是可以的,但跟 chrome 的实现有区别,这需要注意
    https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions

    另外推荐安装类型提示,活动更好的开发体验
    https://github.com/GoogleChrome/chrome-types
    molvqingtai
    molvqingtai
    Jul 19, 2023
    3
    能完整支持 HMR 的只有 plasmo
    @crxjs/chrome-extension-tools HMR 有 bug ,昨天刚提了 PR: https://github.com/crxjs/chrome-extension-tools/pull/755
    Pipecraft
    Pipecraft
    Jul 19, 2023❤️2
    4
    自荐一个 https://github.com/utags/browser-extension-starter ,在 https://github.com/PlasmoHQ/plasmo 项目基础上做的脚手架。
    用它可以同时开发浏览器扩展与用户脚本(油猴脚本),一个代码可以同时编译出 Chrome 扩展,Firefox 扩展与用户脚本。
    已对 storage API 与 用户脚本 API (GM_xxx) 做了封装。

    我用它已经写了 7 个插件,其中一个 V2EX 用户脚本项目供参考。
    https://github.com/v2hot/v2ex.rep
    xiaoz
    xiaoz
    Jul 20, 2023 via Android
    5
    最近我重构了一个 Chrome 扩展,用的 https://github.com/antfu/vitesse-webext ,适合 Vue 开发者,感觉还行。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1784 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 123ms · UTC 10:53 · PVG 18:53 · LAX 02:53 · JFK 05:53
    ♥ Do have faith in what you're doing.