Fix webpacker asset configs for external apps#8107
Merged
leio10 merged 6 commits intodecidim:developfrom Jun 8, 2021
Merged
Conversation
leio10
previously approved these changes
Jun 7, 2021
Contributor
leio10
left a comment
There was a problem hiding this comment.
LGTM, but I'll give a try to double check it. In the meanwhile, can you rebase it to the last develop commit to fix the generator tests? Thanks!
Contributor
Author
|
@leio10 Rebased with develop and fixed the issue you mentioned. |
leio10
approved these changes
Jun 8, 2021
12 tasks
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? Why?
As described at #8103, the asset configurations do not work for external apps outside of the Decidim main repo.
This is an oversight in the original implementation (#8066) where the webpacker override load path was added through the core gemspec. Obviously, this gemspec is not loaded in the actual applications.
This fixes the issue by applying the override load path directly to the webpacker binstubs during the webpacker install command, as that is the only place where this can be done. In addition, this change broke the
assets:precompiletask in some occasions which also needs to know the watch paths (additional paths) from the overridden configuration in order to calculate the asset hash to decide whether the assets need to be recompiled or not.📌 Related Issues
Testing
See #8066 + try out the
assets:precompiletask which should be already in the CI.📋 Checklist
docs/.