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