-
Notifications
You must be signed in to change notification settings - Fork 105
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
When running assets:precompile, Propshaft includes individual digested files for all CSS / JS instead of only bundles #227
Comments
I spotted three question marks, I could only help with some. The digest is intended to be used with Cache-Control: immutable. I hope you already know this, I just provided the answer as feedback to your question. Assuming that the inverse of this statement is what you want:
Have you read bypassing the digest step yet? |
The reason your
|
Thanks, I missed that but I set that and it's still digesting everything in stylesheets and javascript dependencies. For example it still produced this output: The project I'm using doesn't even use Trix so I don't know where that's coming from, but that's a separate issue. That output was with The result I'm looking to get is:
You can reproduce this in my Rails starter app project at: https://github.com/nickjj/docker-rails-example To run it in production mode you'd modify the export COMPOSE_PROFILES=postgres,redis,web,worker,cable
export RAILS_ENV=production
export NODE_ENV=production
export DOCKER_WEB_VOLUME=./public:/app/public Then You can run |
Most likely happening because you're loading
The rationale for including all assets when precompiling is to support modern nobuild techniques that don't require you to use CSS and JS bundlers. This is one of the biggest changes from sprockets and I doubt it will change in the short term. You can run
This most likely happens because If you don't exclude Your main concern in this issue (that all files are included) is the expected behaviour at the moment, and there's an existing issue in #89. |
Hello,
I'm using Rails 8 with Propshaft v1.1.0 along with jsbundling and cssbundling where esbuild is doing the bundling.
After running
assets:precompile
in production mode the following files are created inpublic/
:The concern here is all of the JS and CSS files. When I was using Sprockets, only the
application-xxx.js
andapplication-xxx.css
files were created but with Propshaft it's generating digested files for everything.Based on the Propshaft documentation I thought maybe since bundling is happening with esbuild I could set:
But this resulted in the same outcome where the excess JS and CSS files were created.
What am I doing wrong?
Edit: this is happening with Sprockets too
Here's the same project but using Sprockets:
Is this possibly a Rails 8 change and has nothing to do with Propshaft? Unless I'm crazy (which is very possible), I don't recall all of these files being created in the past by Sprockets. Do we know why they're being created?
The text was updated successfully, but these errors were encountered: