Haxe for javascript without global namespace pollution?

后端 未结 4 807
無奈伤痛
無奈伤痛 2021-02-06 04:54

This question only applies to Haxe version < 2.10

I\'ve known about haxe for a while, but never really played with it until yesterday. Being curious,

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-06 05:14

    The JSTM JavaScript generator macro optimizes haxe output in a number of ways:

    1. the javascript output is split into seperate files per type
    2. these files are optimized
    3. a loader script loads the required types asynchronously
    4. only one global variable is used: jstm
    5. only code that is actually required to run your app is downloaded
    6. new types can be loaded at runtime which makes possible highly scalable apps

    check out http://code.google.com/p/jstm/ for more info.

提交回复
热议问题