jQueryExternForHaxe
jQueryExternForHaxe copied to clipboard
Use JQuery from npm module
Hi !
How can we use it when Jquery is installed from npm and required from webpack ?
Is there a way / option for the JQuery class to be metadata-ed jsRequire('jquery')?
Best,
Thomas
Ah... I see this.
But setting -D hxnodejs will not have any side effect? Is it a jQueryExternForHaxe option or is it used elsewhere?
It doesn't seem to work:
Uncaught ReferenceError: jQuery is not defined
I use both -D hxnodejs and --macro "js.jquery.Config.setNative('jQuery')". Is that allowed?
@andyli I workaround this issue by applying this suggestion:
untyped __js__("global.jQuery = require('jquery')");
Should we address this case in jQueryExternForHaxe or is this a Webpack issue?
I've no experience in using Webpack, so I'm not sure. It would be easier for me to fix it if you can provide a minimal example of the issue.