Repository navigation
Support Propshaft apps in the legacy backend - #1
Closed
markokajzer wants to merge 4 commits into
Closed
markokajzer wants to merge 4 commits into
markokajzer wants to merge 4 commits into
Conversation
sprockets-rails moved from solidus_core to solidus_backend in solidusio#6404, but core still required sprockets/railtie unconditionally. The precompiled assets test hook now also skips pipelines without precompiled_assets.
Uses plain url() instead of sassc-rails' image-url/font-url (sprockets still rewrites them to digested paths), drops the .css.scss suffix from the themes so they can import each other, and vendors font awesome's scss since font-awesome-rails only ships a .css.erb.
The host app still compiles everything. Themes are registered as dartsass-rails builds, and the sprockets directives in the javascript manifests are expanded into individual script tags, with handlebars templates compiled in the browser and spree.js.erb rendered inline.
markokajzer
force-pushed
the
backend-prebuilt-assets
branch
from
October 17, 2026 13:46
5453c7d to
5b9e254
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rails 8 defaults to Propshaft, but
solidus_backendonly works with Sprockets: its JS and SCSS rely on Sprockets directives,sassc-rails,handlebars_assetsand ERB, and Propshaft and sprockets-rails can't run side by side. This follows solidusio#6404 (Sprockets only belongs to the legacy backend) and the Rails main work in solidusio#6677 / solidusio#6679.Nothing changes for Sprockets apps, and nothing is prebuilt: the host app still compiles everything.
url()instead ofimage-url/font-url(Sprockets still rewrites them to digested paths), themes renamed from.css.scssto.scss, and Font Awesome 4.7's SCSS vendored becausefont-awesome-railsonly ships a.css.erbdartsass-rails: the backend registers its themes as dartsass builds, soassets:precompileanddartsass:watchcompile them with the app's own stylesheetsSpree::Backend::PropshaftManifestexpands the//= requiredirectives (including the app'sspree/backend/all.js) into individual script tags, in the order Sprockets would have concatenated them. Handlebars templates are compiled in the browser, andspree.js.erbis rendered inlinesolidus_coreonly requiressprockets/railtiewhen it's installed and Propshaft isn't loaded;solidus_backendskipssassc-railsunder PropshaftCI runs the backend specs on Propshaft for the Rails 8.1 / Ruby 4.0 row.
Verification
mainunder both pipelines (style guide and taxonomy pixel-identical; the rest differ only in random order/SKU numbers)Alternatives considered
Open questions
sassc-rails(and with itsprockets-railsandsassc) becausesolidus_backenddepends on them; they just aren't loaded. Make them optional?all.js/all.css. They work under Propshaft (their directives are expanded too), but could become plain files for new Propshaft apps.@import. That's fine for now, but the backend's stylesheets will eventually need@use.Checklist