Currently I have a package (lets call it package A) that uses Webpack 5. Package A uses a worker. I am using the new Webpack 5 built in worker loader. I can clearly see that the file is being generated and is placed in Package A build directory.
However when I include package A as a dependency of package B the Javascript file that is used by the worker is not imported in to the build directory of the project B.
How do I solve this? Is there something in the package.json file that identifies asset files that must also be included? Is there a way to inline worker.js files so I dont have import it separately?
Any help on this is much appreciated