I'm building a cross-browser extension. I see that Firefox doesn't support yet service workers, while they are mandatory for Chrome. So, I was making some tests in Chrome but when I try to build the extension manifest Parcel is not able to resolve the service worker path:
considering that:
- the same path works fine when used in as background "script" with the same manifest version (3)
- all other paths (for options page, popup, etc.) have the same structure and are recognized
The error I receive is the following:
it seems it is starting path resolution one directory above and missing the root of the project. I couldn't find anything online.
Any idea about this? Thanks.
I tried to put the absolute path, without success. I tried to put different kind of paths, without success.
It should be able to build and bundle the manifest correctly.
It seems the "rootDir" parameter in tsconfig was causing this issue. I really don't understand how it was working before. Really strange.
I just removed the "rootDir" from tsconfig.json and everything works fine now.