web-infra-dev / web-infra-dev/rslib
[Feature]: Warning for potential runtime error when shims is not enabled
Open
@fi3ework is already working on this.
Since Oct 15, 2024.
💡 feature
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 67
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 57
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.