-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
If there is a comment or something which contains the string import, ./utils/stripper.js considers it as a module imports, and outputs a wrong JS string.
- Try adding a comment
// This will import mylibrary.to./__test__/echoworker.worker.jssomewhere. This will throw aSyntaxError. - The
importReregular expression in./utils/stripper.jsshould be sophisticated, and / or some syntax interpretation should be applied.
The fix should pass this test: https://github.com/visvirial/workerloader-jest-transformer/blob/import-comment/__test__/import_in_comments_ts.worker.ts
Related: #4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels