rslib icon indicating copy to clipboard operation
rslib copied to clipboard

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

Open fi3ework opened this issue 1 year ago • 0 comments

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 avatar Oct 15 '24 08:10 fi3ework