You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I installed htmx via npm module. I want to also use some extensions. But mix htmx from npm and extensions in script tag doesn't work. Are there npm module equivalent for extensions ? Or any workaround to use extensions with htmx in .js files ?
Sincerely
The text was updated successfully, but these errors were encountered:
@believelody thank you - this is a very relevant question.
All extensions can be installed using npm. The package naming is htmx-ext-extension-name (replace extension-name with the name of the extension), except for idiomorph. See for example htmx-ext-preload npm package. I have opened a PR which adds npm installation instructions to the extension documentation.
Extensions can currently be imported as ESM modules with this workaround. I have opened another PR to make it possible to integrate them with a clean ESM approach like this:
import`htmx.org`;import`htmx-ext-extension-name`;// Replace `extension-name` with the extension name
Hi there,
I installed htmx via npm module. I want to also use some extensions. But mix htmx from npm and extensions in script tag doesn't work. Are there npm module equivalent for extensions ? Or any workaround to use extensions with htmx in .js files ?
Sincerely
The text was updated successfully, but these errors were encountered: