montagejs / mop

Montage Optimizer (mop): Minifies (to reduce file size) and creates bundles (to reduce the number of requests) of Montage applications.
Other
31 stars 15 forks source link

Disable MJSON compilation #93

Closed cdebost closed 5 years ago

cdebost commented 5 years ago

A post-17.1.2 commit adds mjson serialization to montage, so that we can do require(“foo.mjson”) and get the instantiated object back instead of the json content. mop has to use montage to load packages in order to have things like the template compiler but in doing so, it sets up the mjson compiler, which will be run when mop picks up .mjson files those .mjson files are compiled and executed, leading to code in the constructor of logic modules being executed. This basically means that mop will NOT work on an app that isn’t isomorphic.

cdebost commented 5 years ago

94