https://htmx.org logo
Hi, guys. Could somebody, please, give me a hint a...
# htmx-general
c
Hi, guys. Could somebody, please, give me a hint about what I'm doing wrong? I'm using Laravel mix for bundling my assets and was trying to expose htmx as a global variable. There is an example in the docs about it, but it doesn't work for some reason. index.js (simplified):
Copy code
import Alpine from 'alpinejs';
import 'htmx.org';
import './custom';

window.Alpine = Alpine;
Alpine.start();
custom.js
Copy code
window.htmx = require('htmx.org');
Errors that I'm getting
Copy code
ERROR in ./src/scripts/custom.js 1:0-11
Module not found: Error: Can't resolve 'htmx' in 'D:\somefolder\src\scripts'

ERROR in ./src/scripts/custom.js
Cannot read property 'module' of undefined

webpack compiled with 2 errors