Skip to content

CSS Bundling, Rails 7 and Bootstrap #102

Closed
@resistorsoftware

Description

@resistorsoftware

New Rails 7 App with ESBuild, and Bootstrap. It works. OK. Great. Builds fine.

In the provided app/assets/stylesheets/application.bootstrap.scss file, if I were to add a single class of valid code to use an image, it all breaks. For example:

.test {
   background-image: image-url("foo.jpg");
}

For whatever reason, when the sass command tries to build that, the build blows up with errors. Specifically, the long-ass fingerprint signature added to the asset is part of the error. Not sure why. It seems the helpers for sass are not being digested properly as per the old sassc-rails gem. So what is the modern way to go here?

What is the secret to using the needed helpers to get assets into Sass with the new setup and CSS Bundling gem?

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