developit / developit/workerize-loader
Duplicate worker code inside bundle file with inline option
- Vorherrschende Sprache
- JavaScript
- Sterne
- 2.3k
- Forks
- 85
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi!
When using inline option in the config, I found duplicate worker code in my bundle.
Perhaps this is because of incorrect use of `createObjectURL` and `revokeObjectURL` in the case of `inline: true` option.
I believe in line 186 👇, the argument of `URL.revokeObjectURL` should not be a string with all the worker code inside it, but it should be a product of `URL.createObjectURL` method.
https://github.com/developit/workerize-loader/blob/99d98e4f14e83cff28b9269660964d5424d865bb/src/index.js#L186
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start in src/index.js at the linked code around line 186 and inspect how createObjectURL and revokeObjectURL are used when inline is true. Reproduce an inline build, compare the generated bundle with the non-inline case, and confirm that the worker code appears only once.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, webpack
- Bereich
- build-system, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100