rails / cssbundling-rails

Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.
MIT License
564 stars 83 forks source link

[BUG] `sass:compile` + `postcss` => Loads CSS File Twice #156

Closed mario-amazing closed 1 week ago

mario-amazing commented 1 week ago

Description

In a Rails default app setup, the CSS file is loaded twice, resulting in both application.css and application-[digit].css being loaded.

Steps to Reproduce

  1. Create a new Rails app with the following setup:
    rails new newapp --css=bootstrap --javascript=esbuild -a propshaft --master
  2. Generate a scaffold for books:
    rails g scaffold books title:string author:string publication_year:integer
  3. Start the server and navigate to the application in your browser.
  4. Inspect the sources in the browser's developer tools. Screenshot 2024-06-24 at 14 55 44

Expected Behavior

Only one version of the CSS file application-[digit].css should be loaded.

Actual Behavior

Both application.css and application-[digit].css are loaded.

Additional Information

mario-amazing commented 1 week ago

This is a Google Chrome feature, there is only one css file on the web

image