Open loynoir opened 2 years ago
Do other bundlers support this too? I mainly try to have esbuild follow existing conventions instead of inventing new ones. I don't think esbuild should do something like this without e.g. Webpack doing this too, because I don't want to create new conventions and fragment the community.
It seems this has been implemented in Webpack 30 days ago https://github.com/webpack/webpack/issues/14228 https://github.com/swc-project/swc/issues/4101
https://github.com/evanw/esbuild/issues/1921#issuecomment-1898197331 This seems to be a temporary solution
But, reference to a global variable
require
within ESM, I think it's not in standard?