samrum / vite-plugin-web-extension

A vite plugin for generating cross browser platform, ES module based web extensions.
MIT License
331 stars 32 forks source link

content script in dev mode is not working on firefox #87

Closed WOSHIZHAZHA120 closed 1 year ago

WOSHIZHAZHA120 commented 1 year ago

WebExtension content scripts may only load modules with moz-extension URLs and not: “http://localhost:5173/src/entries/contentScript/primary/main.ts”.

图片

Firerer commented 1 year ago

work around: use vite build --watch instead of vite

samrum commented 1 year ago

Yeah, until Firefox supports loading modules from localhost in a content script, you won't be able to use this plugins implementation of dev mode with it. Like the previous comment says, using watch with build is an alternative or developing in Chromium which supports it.