developit / developit/web-worker
Running through rollup for node causes issues with dynamic require
- Lingua principale
- JavaScript
- Stelle
- 1.2k
- Fork
- 57
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Thanks for a neat little library!
I was attempting at incorporating it into a library of mine which I bundle using rollup and I get an issue
````
Error: Dynamic requires are not currently supported by rollup-plugin-commonjs
````
which was related to [this line of your library](
https://github.com/developit/web-worker/blob/master/node.js#L190)
From what I can tell it looks like it's to do with requiring the URL of the worker?
Anyway just thought I'd flag it as other users of rollup may run into the same issue.
Cheers
Rowan
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inspect node.js around line 190 and reproduce the library bundle with Rollup to confirm the dynamic-require error. Determine how the worker URL is required there, then verify that a Rollup build completes without the reported error while preserving Node worker behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js, rollup
- Ambito
- build-system, tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100