You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 in public/:
The concern here is all of the JS and CSS files. When I was using Sprockets, only the application-xxx.js and application-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:
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:
Propshaft includes individual digested files for all CSS / JS instead of only bundles
Have you read bypassing the digest step yet?
It is basically Propshaft's interface for working with other build tools (esbuild included); can it solve your problem?
Why or why not?
The reason your excluded_paths config doesn't work is because you're not setting absolute paths. You'll need to use Rails.root.join. From the README:
You can however exempt directories that have been added through the config.assets.excluded_paths. This is useful if you're for example using app/assets/stylesheets exclusively as a set of inputs to a compiler like Dart Sass for Rails, and you don't want these input files to be part of the load path. (Remember you need to add full paths, like Rails.root.join("app/assets/stylesheets")).
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: