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.
1 parent 453f1a2 commit 4d3d0bcCopy full SHA for 4d3d0bc
packages/vite/src/node/plugins/workerImportMetaUrl.ts
@@ -182,7 +182,7 @@ async function getWorkerType(
182
}
183
184
const workerImportMetaUrlRE =
185
- /new\s+(?:Worker|SharedWorker).+new\s+URL.+import\.meta\.url/s
+ /new\s+(?:Worker|SharedWorker)\s*\(\s*new\s+URL.+?import\.meta\.url/s
186
187
export function workerImportMetaUrlPlugin(config: ResolvedConfig): Plugin {
188
const isBuild = config.command === 'build'
0 commit comments