Skip to content

Commit

Permalink
Merge pull request #973 from thewtex/worker-esm
Browse files Browse the repository at this point in the history
fix(createWebWorkerPromise): use type: 'module' option for Worker
  • Loading branch information
thewtex authored Oct 13, 2023
2 parents c505f6e + 92f9492 commit 3cf9f49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/createWebWorkerPromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function createWebWorkerPromise (existingWorker: Worker | null, pipelineWo
// Use the version built with the bundler
//
// Bundlers, e.g. WebPack, Vite, Rollup, see these paths at build time
worker = new Worker(new URL('../web-workers/pipeline.worker.js', import.meta.url))
worker = new Worker(new URL('../web-workers/pipeline.worker.js', import.meta.url), { type: 'module' })
} else {
if (workerUrl.startsWith('http')) {
const response = await axios.get(workerUrl, { responseType: 'blob' })
Expand Down

0 comments on commit 3cf9f49

Please sign in to comment.