rslib
rslib copied to clipboard
[Feature]: Warning for potential runtime error when shims is not enabled
What problem does this feature solve?
For example, if the shim of __dirname is not enabled for ESM output, there will be a runtime error when executing. It's better to provide a warning when building.
What does the proposed API look like?
Possible solutions:
- By parser hooks (Rspack not supported yet).
- Dedicated Lexer.