Hacker News new | ask | show | jobs
by eyelidlessness 1060 days ago
Bun internally treats most CJS modules as ESM, mapping require() calls to synchronous import() etc. And ESM is always strict mode, so that might be the issue?
2 comments

This used to be true, but now it transpiles to CommonJS with sloppy mode by default when "exports" or "module" is used
Bun is not able to run non-strict javascript and there is no documentation that suggests it will be supported. No choice other than running Node.JS for this.