I have a regression since haxe-loader 0.7.4 (worked fine up to 0.7.3), but I'm not sure if it's from modular or haxe-loader.
I cannot reference Main module in bundles any more since 0.7.4.
Common modules work fine, but not main which gets compiles as:
var Main, X = $s.a /*, etc.*/;
A "minimal" (not so minimal since I wanted to check if it was about shared modules or just Main) example to reproduce:
Main.hx
package;
class Main {
public static var test:String = "test";
public static function main() {
Webpack.load(Bundle1).then(function(_) {
new Bundle1();
});
Webpack.load(Bundle2).then(function(_) {
new Bundle2();
});
}
}
Common.hx
package;
class Common {
public static var test:String = "test";
}
Bundle1.hx
package;
class Bundle1 {
public function new() {
trace('New Bundle1');
trace(Common.test);
}
}
Bundle2.hx
package;
class Bundle2 {
public function new() {
trace('New Bundle2');
trace(Main.test); // Will fail at runtime, Main is undefined
trace(Common.test);
}
}
I have a regression since haxe-loader 0.7.4 (worked fine up to 0.7.3), but I'm not sure if it's from modular or haxe-loader.
I cannot reference Main module in bundles any more since 0.7.4. Common modules work fine, but not main which gets compiles as:
A "minimal" (not so minimal since I wanted to check if it was about shared modules or just Main) example to reproduce:
Main.hx
Common.hx
Bundle1.hx
Bundle2.hx