samrum/vite-plugin-web-extension

content script in dev mode is not working on firefox

WOSHIZHAZHA120 opened this issue · 2 comments

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

图片

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

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.