elsassph / haxe-modular

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

Generate bridge marker in a way that analyzer won't remove it. #100

Closed back2dos closed 4 years ago

back2dos commented 4 years ago

The current version generates something like var _ = "...__BRIDGE__";, which for the analyzer is an unused variable initialized to a constant, so it throws it out. Since there's no use for the var anyway, I chose to generate it as inline JavaScript, as the compiler will never touch that.