daijinara PRO said almost 2 years ago on Organizing Stimulus Controllers :
  Hi David! I love your contents and you are my mentor. 

I practice the way you organize Stimulus files. I am back to sprockets with Hotwire-rails and abandoned webpacker for my new project.

I am wondering do you do the "ApplicationController" in this environment? 

Also have you figured out the functionality of "libraries" folder in Hotwire-rails? 

I am using Skypack for the external js libraries, such as rails/request.js, so there is not match of a problem to be honest, but I am just curious if import from "node_module" folder is good practice with Sprocket. 

For example, ActionText is design to use webpacker as default. But is the elegant way to integrate ActionText in Hotwire-Rails & Sprockets environment?

David Kimura PRO said almost 2 years ago on Organizing Stimulus Controllers :
  Thanks! Personally, I still use webpacker as I have personally not experienced a lot of issues with it. It is a bit slow when creating new applications and from time to time do run into some nontrivial issues, but nothing that has forced me into a different direction. With the current version of hotwire-rails, both Turbo and Stimulus will install under app/javascript if you have webpacker installed on the project. 

I haven't tried using the ApplicationController for Stimulus on a non-webpacker app yet, but I'd imagine that it would work similarly.

I will probably continue to use webpacker for me applications until the Rails core advises for a different route. I think going the pure sprockets way will have some growing pains in modern Rails apps until there is a set standard way. It does seem like we are in a pre-transitionary period around this stuff, but this is my speculation and not based on any actual direction that I've seen. (other than hotwire-rails working with or without webpacker)

daijinara PRO said almost 2 years ago on Organizing Stimulus Controllers :
  Thank you so much for your experienced wisdom and insights. I stopped using webpacker because it suddenly broke front-end css/scss rendering. I could have looked into it deeper to solve the issue but your bootstrap 5 tutorial was interesting, and also I have a blind impression that DHH and Basecamp engineers are building their app with pure sprockets, so I am experimenting with sprocket again. 

I hope the Stimulus will solve the potential growing pains that you mentioned.

Your contents is essential to achieve my goal in life. 

Thank you for creating this!



Login to Comment