V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yangyifan
V2EX  ›  问与答

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

  •  
  •   yangyifan · 283 天前 · 936 次点击
    这是一个创建于 283 天前的主题,其中的信息可能已经有所发展或是发生改变。
    本人主要做后端开发现在遇到需求需要开发一个浏览器插件,想请问有什么推荐的文档之类的吗?或者有没有一些脚手架相关的。
    5 条回复    2023-07-20 01:46:31 +08:00
    DOLLOR
        2
    DOLLOR  
       283 天前
    我一直用 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
        3
    molvqingtai  
       283 天前
    能完整支持 HMR 的只有 plasmo
    @crxjs/chrome-extension-tools HMR 有 bug ,昨天刚提了 PR: https://github.com/crxjs/chrome-extension-tools/pull/755
    Pipecraft
        4
    Pipecraft  
       283 天前   ❤️ 2
    自荐一个 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
        5
    xiaoz  
       283 天前 via Android
    最近我重构了一个 Chrome 扩展,用的 https://github.com/antfu/vitesse-webext ,适合 Vue 开发者,感觉还行。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3622 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 04:28 · PVG 12:28 · LAX 21:28 · JFK 00:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.