aklinker1/webext-core

Proxy service not code-splitable

Opened this issue · 0 comments

For example, the this service imports minimatch to use it in the real implementation, but minimatch is included in the final bundle in all entrypoints, not just the background.

Screenshot 2023-10-30 at 8 11 52 PM

Unfortunately, I can't think of a way to accomplish tree shaking without putting the real service and proxy service in a separate file. The more services you have, the more annoying it would be... Just lots of extra files in a project.

Maybe an alternative package, like @webext-core/background-api could be used to group all services under a single object.