Skip to content

When running assets:precompile, Propshaft includes individual digested files for all CSS / JS instead of only bundles #227

Closed
@nickjj

Description

@nickjj

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 in public/:

image

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:

Rails.application.config.assets.excluded_paths << ["app/assets/stylesheets", "app/javascript"]

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:

image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions