We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JSON.stringify
1 parent f0c6abc commit 0bf97ddCopy full SHA for 0bf97dd
test/es-module/test-esm-import-meta-main-eval.mjs
@@ -27,7 +27,7 @@ function convertScriptSourceToDataUrl(script) {
27
function wrapScriptInUrlWorker(script) {
28
return `
29
import { Worker } from 'node:worker_threads';
30
- new Worker(new URL("${convertScriptSourceToDataUrl(script)}"));
+ new Worker(new URL(${JSON.stringify(convertScriptSourceToDataUrl(script))}));
31
`;
32
}
33
0 commit comments