Closed salex closed 2 years ago
Well I was a little confused seeing the note about stimulus 3.0.1 supported.
I then saw the note in stimulus-use to use hotwire/stimulus-use to use @beta in yarn.
I then tried bin/importmap pin stimulus-flatpickr@beta
and after adding a <link rel="stylesheet" href="https://ga.jspm.io/npm:flatpickr@4.6.9/dist/flatpickr.min.css">
tag I got it to work.
I'll close this but maybe you should make you install instructions a little more clear for different versions.
This is not an issue, (at least at this point) - but more of a question.
I've spent quit a bit of time over the last few week looking at rails 7 alpha trying to gauge how hard it's going to be to move my 3 puny apps forward and what approach will cause the least amount of pain. I've tried both new rails 7 apps and trying to add the gems (cssbundling-rails, jsbundling-rails, import maps-rails) to a branch on an existing app.
Since the esbuild approach is more or less using node packages without webpacker, I have managed to get most stuff working in an existing app (or a new rails 6 demo/test app). My apps are mainly pure Rails with some stimulus.js.
I do use two stimulus wrapper apps. Stimulus-flatpickr and Stimulus-autocomplete. I haven't tried real hard, but I can't get either of them to work with the import maps option. There are configuration option that I have not tried (maybe a little over my head at this time) that may get it to work (preload??)
Since stimulus also exists outside of the rails world, maybe someone has the answer (will it work with import maps?). I don't think the flatpickr controller is registering/firing, but can't think of a way to verify that. Then there is the flatpickr.css dependency that has caused some problems if not set up right.
My importmap.rb file
Hopefully Rails will have some upgrade procedures to lessen the pain, but this is a big jump (back to before webpacker!)
If someone can point me so some example/document, I'd be grateful.
Edit
Tried a few more things with no results just a different error
Guss it want @hotwire/stimulus