Dynamic stylesheet includes with Webpacker #8115
Merged
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? Why?
The Decidim asset compilation will fail if all Decidim gems are not available in the bundle because the
application.scss
assumes all these gems are available:decidim/decidim-core/app/packs/stylesheets/decidim/application.scss
Lines 4 to 12 in 6bd8053
This works fine when Decidim is installed from GitHub (because they are all available in the repository) but it fails when it is installed e.g. through RubyGems in the future.
See further explanations from #8109.
This PR proposes a solution to this problem by moving the stylesheet import configurations to the module's
assets.rb
.📌 Related Issues
Testing
See #8109
📋 Checklist
docs/
.