Skip to content

Commit 3cf9f49

Browse files
authored
Merge pull request #973 from thewtex/worker-esm
fix(createWebWorkerPromise): use type: 'module' option for Worker
2 parents c505f6e + 92f9492 commit 3cf9f49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/createWebWorkerPromise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function createWebWorkerPromise (existingWorker: Worker | null, pipelineWo
4949
// Use the version built with the bundler
5050
//
5151
// Bundlers, e.g. WebPack, Vite, Rollup, see these paths at build time
52-
worker = new Worker(new URL('../web-workers/pipeline.worker.js', import.meta.url))
52+
worker = new Worker(new URL('../web-workers/pipeline.worker.js', import.meta.url), { type: 'module' })
5353
} else {
5454
if (workerUrl.startsWith('http')) {
5555
const response = await axios.get(workerUrl, { responseType: 'blob' })

0 commit comments

Comments
 (0)