-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot import anything from node_modules/ external dependencies into web worker #63
Comments
Have you tried setting
The README describes the option as follows:
It seems by default all external modules are expected to be provided in scope separately unless you tell it to bundle the externals that way. |
I would also like to understand how to resolve this |
@theosanderson Did you try the above solution? It should resolve this. |
Hi @mattrossman, Ed: nodeResolve seems to help, now debugging hopefully a different issue |
Right, it should be exactly Yes, IIRC I used |
Hey @mattrossman . |
The Web Worker is failing to load external dependencies.
The web worker works fine for standalone functions that are written inside the Worker.ts file but when I moved actual code that had external dependencies I saw this in the console:
Saw this when running the
rollup -c
:This is my rollup.config.js
Should you be able to load external dependencies into the web worker? I am able to import relative files just fine but it breaks anytime I try to use an npm package. Is there some configuration I need to change to make this work?
The text was updated successfully, but these errors were encountered: