Unable to bundle htmx
I followed the directions here: https://htmx.org/docs/#webpack
So now my app.js looks like this:
While htmx is working, the hx-* attributes work, the htmx function is not initialized.
If I comment out the htmx section of my app.js and load it directly from CDN via a script tag it works as expected.
Any assistance, even pointing me to the part of the very fine manual I missed, would be appreciated!
import htmx from "htmx.org";
window.htmx = htmx;
You can try this instead. Your bundler may not support the older require style imports but this should import it as a proper ES Module.
That worked. Would it make sense to update documentation? If so, that's something I'm willing to attempt