Fix production worker isolation headers
This commit is contained in:
@@ -115,7 +115,16 @@ function runPluginInWorker<TOptions>(
|
||||
const onError = (e: ErrorEvent) => {
|
||||
cleanup();
|
||||
discardPluginWorker(plugin, worker);
|
||||
reject(new Error("Worker error: " + e.message));
|
||||
const location = e.filename
|
||||
? ` (${e.filename}${e.lineno ? `:${e.lineno}:${e.colno}` : ""})`
|
||||
: "";
|
||||
reject(
|
||||
new Error(
|
||||
`Worker failed to load or execute${location}: ${
|
||||
e.message || "check worker, CORS, and cross-origin isolation headers"
|
||||
}`
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
context.signal.addEventListener("abort", onAbort);
|
||||
|
||||
Reference in New Issue
Block a user