developit / developit/web-worker

Running through rollup for node causes issues with dynamic require

Ouverte
#6 11 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
1.2k
Forks
57
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.