-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.0] Webpack installation, global HTMX properties undefined #2628
Comments
may be related to #2629 not familiar w/ webpack does it use any of the javascript modules? if so you might need to switch to the new module-specific files in the distribution |
The webpack installation documentation hasn't been updated so I assumed the setup is the same. None of the other js libraries I use in webpack need to specifiy any special module types. |
entirely possible that those instructions are wrong now, unfortunately, since no one on the core team that I'm aware of uses webpack. We will get the .d.ts file fixed in the next release and then we can try again, and then maybe try by referencing one of the module files ( |
I figured out how to set it up correctly. I'll create a pull request to fix the documentation. For anyone who needs it
becomes
|
Thanks @Jesmaster you've helped me to resolve my issue. I use Vite and I had to do a similar change there. In the vite.config.js file i had to replace
This is related to: bigskysoftware/htmx-extensions#128 |
fyi using htmx 2.0.2 <script>
import htmx from 'htmx.org';
window.htmx = htmx;
</script> and i confirmed presence in the browser by printing |
I just tried updating to 2.0 in my Webpack project and it looks like issue #1964 came back. Having the exact same problem as then.
Switching back to version 1.9.12 fixes the issue.
The text was updated successfully, but these errors were encountered: