-
|
I am trying to use MathJax with bun when I came across some very weird bug which prevents MathJax from being imported correctly. This does not appear with Node.js (v25.2.1), but does with Bun (1.3.3). ReproductionI managed to reproduce the same problem with just three files:
then run bun entry.js # or node entry.jsbun will complain about TypeError: as if while node will output NotesIt's worth mentioning that it seems the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Some updates: if we change import './setup.js';
await import('./test.js');Bun will also print 42 🤔 So is this related to async module resolution? Maybe I should file an issue on the MathJax side? |
Beta Was this translation helpful? Give feedback.
Yeah this does look like very risky code because imports are implicitly async so they shouldn't really be relying on sideffects like that imo