I started a fresh rails 7 application using jsbundling-rails (with esbuild) and cssbundling-rails (with bootstrap).
The pipeline works well to build assets. After testing that, I removed sprockets gem and configs from application (basically, I removed all calls with .assets on config files)
So, after remove sprocket, my assets can't be reach from frontend
<%= javascript_include_tag 'application' %>
I'm debugging but it isn't clear what's wrong...
After I've seen some tutorials, I discovered which sprockets can't be removed.
While I'm upgrading I removed a lot of gems, and someone that import sprockets as a dependency.
I fixed adding sprockets directly:
I also simplified my
assets.rbfile:It's important search for other files which use
.assetsfrom code.My
manifest.jsfile (sprockets looks to that file):References:
https://www.youtube.com/watch?v=h8DmZhkRoJs
https://www.youtube.com/watch?v=DhM-Wh9Pmd4