-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Hello, I'm using Vite as a bundler and I'm unable to make htmx extensions work.
If I write:
import 'htmx.org';
import 'htmx.org/dist/ext/preload.js';
it compiles correctly but I then get this error in the console:
Uncaught ReferenceError: htmx is not defined
I've also tried making sure that htmx is available globally:
import * as htmx from 'htmx.org';
window.htmx = htmx;
But it doesn't seem to make a difference.
So is there a way to use extensions with a bundler like Vite?
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels