Jervis2049 / vite-plugin-crx-mv3

Build a Chrome Extension with Vite⚡
201 stars 30 forks source link

manifest->background 设置type:"module",打包后自动被去除 #15

Closed AIG-CN closed 1 year ago

AIG-CN commented 1 year ago

起因是我在background引入第三方模块,报错Uncaught SyntaxError: Cannot use import statement outside a module。 然后尝试在background { "service_worker": "background.js", "type": "module" // 增加 module } 但是打包出来的manifest中 type:"module" 被自动去除,请问大佬这个可以解决吗,不然每次都得自己手动补上

Jervis2049 commented 1 year ago

最新的版本已经修复。

Jervis2049 commented 1 year ago

14 这个issue提过了。