Execute js file which uses Worker API #1539
Unanswered
GabrielePicco
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Jint doesn't implement the Worker API so that's why it won't work. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version used
v3.0.0
Describe the bug
I'm trying to use a lib bundled with rollup, which uses the Worker api
To Reproduce
The line causing the issue is:
var browser$1 = Worker;
which fails with:
JavaScriptErrorWrapperException: Worker is not defined
Expected behavior
Being able to use the Worker api
Additional context
I tried also to add
export { Worker } from "worker_threads";
before bundling with rollup and embedding a worker mock with rollup-plugin-worker-factory, but without success.Beta Was this translation helpful? Give feedback.
All reactions