developit / developit/workerize-loader

Duplicate worker code inside bundle file with inline option

Abierto
#129 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
2.3k
Forks
85
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, webpack
Área
build-system, tooling
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.