Struggling with esbuild
With the arrival of Rails 7.0, i have tried moving from webpack to esbuild but struggle with it.
-
I understand how to load jquery or jqueryui (and now datatables) but how do i load flatpickr? Dropzone? Select2? And globally any other library? https://flatpickr.js.org https://www.dropzone.dev https://select2.org
-
I know that theoretically import jquery from “jquery” window.jQuery = jquery window.$ = jquery Should make $ available in the views… but sometimes it doesnt but i have no idea why (even if esbuild compiles) Any idea how to troubleshoot?