Reporter: Fix wrongly loading worker chunks

Also fixes duplicate patchedBy on patched modules and bumps pnpm to latest version
This commit is contained in:
Nuckyz 2025-02-19 01:47:21 -03:00
parent 71ade7d658
commit dd714ff3c2
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
4 changed files with 71 additions and 75 deletions

View file

@ -68,7 +68,7 @@ export async function loadLazyChunks() {
const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => t.includes("importScripts("));
.then(t => /importScripts\(|self\.postMessage/.test(t));
if (isWorkerAsset) {
invalidChunks.add(id);
@ -174,7 +174,7 @@ export async function loadLazyChunks() {
await Promise.all(chunksLeft.map(async id => {
const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
.then(r => r.text())
.then(t => t.includes("importScripts("));
.then(t => /importScripts\(|self\.postMessage/.test(t));
// Loads the chunk. Currently this only happens with the language packs which are loaded differently
if (!isWorkerAsset) {