svelte-tailwind-extension-boilerplate
svelte-tailwind-extension-boilerplate copied to clipboard
manifest v3
Hi, I'm trying to upgrade to manifest v3 but I am not able to resolve the following error.
rollup v2.36.2
bundles src/manifest.json → dist...
[!] Error: There were problems with the extension manifest.
- ["background/index.ts"] at "/background/service_worker" must be string
...
...
...
Steps to replicate
- Update rollup-plugin-chrome-extension with
yarn add rollup-plugin-chrome-extension@latest -D
- Specify "manifest_version": 3,` in the manifest.json file
- Change "browser_action" to "action" as per this migration guide.
- Run
yarn dev
Quick update, I managed to stop the error from showing by moving replacing background/index.ts
with background.ts
but not sure if this is the right thing to do...
Just chiming in here.
Quick update, I managed to stop the error from showing by moving replacing
background/index.ts
withbackground.ts
but not sure if this is the right thing to do...
You need to rename the background/index.ts
to background/ts
as you need to change the reference from an array to a string.
Also, the new V3 standard expects the background.js file to exist in the project root.
Found this and more hints here: https://stackoverflow.com/questions/66114920/service-worker-registration-failed-chrome-extension