Summary
Removed all references to sprockets content and moved the CSS and JS calls to the SHOW view in the order defined in the original manifests.
Reason
Sprockets is going away. This gem will not work with an ESBUILD based, rails 7 app.
I followed the README instructions as outlined and on several blog posts. They all said the same thing, create your rails app, add the gems, add the sprocket reference, and you should have magic. However, this didn't happen with Rails 7. It isn't as plug-and-play as expected if you exclude sprockets from your setup.
Sprockets loads the css and manefest.js files, but doesn't actually compile/include the code it supposed to link to, it merely shows the require lines of code in the JS file. When you open the browser devtools to look at the manifest.js resource, you see the following:
What you should see is a compilation of each file into the one manifest. However, sprockets is effectively neutered (turned off) with Rails 7. It doesn't work.
Summary Removed all references to sprockets content and moved the CSS and JS calls to the SHOW view in the order defined in the original manifests.
Reason Sprockets is going away. This gem will not work with an ESBUILD based, rails 7 app.
require
lines of code in the JS file. When you open the browser devtools to look at the manifest.js resource, you see the following:What you should see is a compilation of each file into the one manifest. However, sprockets is effectively neutered (turned off) with Rails 7. It doesn't work.
Solution