Skip to content

Commit

Permalink
fix: new SharedWorker syntax (#7800)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathe42 authored Apr 19, 2022
1 parent e5729be commit 474d5c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/workerImportMetaUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function workerImportMetaUrlPlugin(config: ResolvedConfig): Plugin {
}
let s: MagicString | undefined
if (
(code.includes('new Worker') || code.includes('new ShareWorker')) &&
(code.includes('new Worker') || code.includes('new SharedWorker')) &&
code.includes('new URL') &&
code.includes(`import.meta.url`)
) {
Expand Down

0 comments on commit 474d5c2

Please sign in to comment.