elsassph / haxe-modular

Haxe-JS code splitting, NPM dependencies bundling, hot-reload
116 stars 14 forks source link

Runtime exception about HxOverrides #108

Closed gene-pavlovsky closed 3 years ago

gene-pavlovsky commented 3 years ago

Using GitHub version of modular (commit a46a26a5) and Haxe 4.1.5, I'm getting a runtime exception cause by this code: HxOverrides.now = performance.now.bind(performance);

Console log:

Uncaught ReferenceError: HxOverrides is not defined

elsassph commented 3 years ago

I see this code is generated for Timer.stamp(), but the issue doesn't happen with master version of Modular, as far as I can see.

elsassph commented 3 years ago

Can you confirm: are you using ES6 output?

gene-pavlovsky commented 3 years ago

We don't have the -D js-es=6 option in the build files. Default is ES5, right?

elsassph commented 3 years ago

Yes. I'm doing a new branch with Haxe 4.2+ fixes, and supporting both ES5 and ES6 outputs.

gene-pavlovsky commented 3 years ago

At the moment we're stuck on Haxe 4.1.5 due to some libraries compatibility. I'm not getting the runtime exception anymore, I think after I updated the haxe-modular npm package to 0.12.1. Thanks for your help

elsassph commented 3 years ago

That's ok, the library is backwards compatible with Haxe up to 3.x.