Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Warning for potential runtime error when shims is not enabled #295

Open
fi3ework opened this issue Oct 15, 2024 · 0 comments
Open
Assignees

Comments

@fi3ework
Copy link
Member

fi3ework commented Oct 15, 2024

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:

  1. By parser hooks (Rspack not supported yet).
  2. Dedicated Lexer.
@fi3ework fi3ework self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant