fix(assets): Skip SassC compression for prebuilt admin CSS - #3952
Merged
Conversation
tvdeyen
enabled auto-merge
June 11, 2026 06:55
tvdeyen
added a commit
to AlchemyCMS/alchemy-solidus
that referenced
this pull request
Jun 11, 2026
Member
Author
|
See it in action AlchemyCMS/alchemy-solidus#148 |
sascha-karnatz
approved these changes
Jun 11, 2026
tvdeyen
force-pushed
the
fix/skip-sass-compression-for-builds
branch
from
June 11, 2026 09:07
24d1167 to
71d1bc8
Compare
Alchemy ships pre-built, already-minified admin CSS in app/assets/builds that uses modern CSS syntax such as relative colors and oklch(). When a host app pulls in sassc-rails (the default in any Solidus app), Sprockets sets the :sass css_compressor, which re-parses every text/css asset as SCSS through the unmaintained libSass and raises on that syntax. Since these files are already minified, prepend a skip onto the SassC compressor for assets under our builds directory and leave every other stylesheet to be compressed as before.
tvdeyen
force-pushed
the
fix/skip-sass-compression-for-builds
branch
from
June 11, 2026 12:15
71d1bc8 to
6e2df59
Compare
The "when sprockets is not defined" example removed the top-level Sprockets constant with Object.send(:remove_const, :Sprockets) but never restored it, permanently mutating global state for the rest of the process. Under eager loading this leaked into later specs that rely on Sprockets being defined, making them fail depending on run order. hide_const hides the constant only for the duration of the example and restores it automatically, matching the sibling stub_const context.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3952 +/- ##
==========================================
- Coverage 98.16% 98.15% -0.01%
==========================================
Files 344 345 +1
Lines 8953 8964 +11
==========================================
+ Hits 8789 8799 +10
- Misses 164 165 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
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.
What is this pull request for?
Alchemy ships pre-built, already-minified admin CSS in app/assets/builds that uses modern CSS syntax such as relative colors and
oklch(). When a host app pulls insassc-rails(the default in any Solidus app), Sprockets sets the:sasscss_compressor, which re-parses everytext/cssasset as SCSS through the unmaintained libSass and raises on that syntax. Since these files are already minified, prepend a skip onto the SassC compressor for assets under our builds directory and leave every other stylesheet to be compressed as before.Checklist