Closed errorx666 closed 1 month ago
I started with a real-world error and stripped out as much as possible while still preserving the error.
I appreciate the effort but the reproduction is not minimal at all... There's 7 files and 11 dependencies. Please minimize it so tsx
is the only dependency.
@privatenumber I have reduced it to one file and one external dependency. Please check again.
Thanks, I appreciate it!
I believe the root problem is in es-module-lexer
assuming of
is a reserved identifier. I reported it here: https://github.com/guybedford/es-module-lexer/issues/173
I also noticed an opportunity to skip the parsing completely in your case as the parsing is only used to detect dynamic imports, which you're not using. Upgrading to tsx v4.10.3 should fix your use-case.
Thank you for the quick turnaround! I would never have thought of that.
:tada: This issue has been resolved in v4.10.5
If you appreciate this project, please consider supporting this project by sponsoring :heart: :pray:
Acknowledgements
Minimal reproduction URL
https://stackblitz.com/edit/stackblitz-starters-gtalwu?file=tsconfig.json
Problem & expected behavior (under 200 words)
npm start
Expected: code runs Actual: Parse error
Works with bun
Bugs are expected to be fixed by those affected by it
Compensating engineering work financially will speed up resolution