New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sprockets doesn't seem to be preprocessing sass code in rails 7 alpha2 #43555
Comments
I've noticed similar behavior. I've been testing out rails 7 alpha2 with esbuild, bootstrap, and custom scss file. I've found running More or less same as above:
custom.scss Expected behavior System configuration |
First, make sure you're on at least sprockets-rails 3.3.0 (just released Nov 11). This enables proper digest handling for Second, with cssbundling-rails you'll need to switch Finally, there's still a bug in sprockets-rails that can cause some digested assets to not be copied into public/assets/ properly (this will likely only affect production). If this is affecting your app, you won't see As a workaround, and if necessary, you can reference those assets in |
This issue has been automatically marked as stale because it has not been commented on for at least three months. |
Steps to reproduce
Expected behavior
What should happen is sprockets compiles the term
image-url
down to aurl
attribute linked to an image in the images folder of the asset pipeline.Actual behavior
image-url
is being passed all the way to the browser, that being incorrect css syntax, it doesn't pick up the image for display. If you change the line in package.json that hasbuild:css
, change the second path, which is the output path for the sass code to./app/assets/builds/application.scss
Notice thescss
instead ofcss
. Sass needs to do it's thing and throw it in any file you want to name it, even if it's all css on the inside. Then that file needs to go through sprockets as a sass object to convert its share of methods. It doesn't know to pick up a sass file unless you name is as such withscss
. The script generating the package.json file for installing sass is generating an incompatible file type.System configuration
Rails: 7.0.0alpha2
Ruby: 3.0.2
https://www.rubydoc.info/gems/sprockets/4.0.0
The text was updated successfully, but these errors were encountered: