Closed sonygod closed 5 years ago
Visibly Heaps uses eval
as function argument name somewhere. It looks like the webpack bundling (looks like Babel processing involved to process Vue files) doesn't allow using this name in the code.
You may have to either look whether non complaining about eval
is an option for Babel, or suggest Heaps to not use this argument name.
@elsassph current hxgenjs is not work for Chrome ,May be it's only for Node.js dev.
it's export by custom define exports ,not work
@kevinresol
Did you bundle on chrome?
build haxe code for vue dev,run in chrome browser.
hxgenjs emits CommonJS code (sync require
) and that won't work on browser by default. You need to bundle it using webpack or browsify, etc. Did you do so? And what is the exact error you are getting?
yes ,I use Vue-cli 3.4 tool to build and wepack the sources from hxgenjs.
after webpack,it's throw exports is not defined.
I can give you small project example later.
build args
... main Main -dce full -D hxextern
here is examples files and error
did you try patching the eval
argument name to something else?
I don't have use eval anywhere
,it's seem include Heaps engine ,for shader .
Doesn't seem to be a problem of hxgenjs. Closing for now.
hi,just test with heaps framework ,and got this error.
haxe -lib heaps -lib hxgenjs -cp src -cp samples -js Y:/test/test/src/components/haxe/haxetest.js -main Main -dce no -D hxextern
haxe version:3.4.7
shareshader.js run in vue