jasononeil / webpack-haxe-loader

Webpack loader for the Haxe programming language.
MIT License
38 stars 11 forks source link

Adding modular lib to HXML breaks the output #26

Closed elsassph closed 6 years ago

elsassph commented 6 years ago

If an HXML adds -lib modular (or -lib modular:0.9.3) the output will be modified by Modular before it is consumed by Webpack, resulting in invalid JS being generated (because Modular inserts a require shim code).

Solution is to detect when modular is added as a lib and throw an error explaining that it should be removed.

See: https://github.com/elsassph/haxe-modular/issues/53