fix(bud-install): sass, postcss, tailwindcss #703
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.
Type of change
Dependencies added
Details
In #700 we have an issue where sass can't be installed using
bud install
because Bud is attempting to access dependencies (which don't exist) before the install command has a chance to run. similar issues exist in other extensions with peer dependencies. We don't have these issues in the monorepo because our modules are all hoisted.This PR addresses these issues for @roots/bud-sass, @roots/bud-postcss and @roots/bud-tailwindcss by attempting to resolve the dependencies within try/catch blocks at the start of the extension registration/boot. If something isn't found it exits the callback early which should give the install command time to run.
I imagine this issue exists for other extensions with peer dependency requirements (like @roots/bud-react). Those can be handled separately.
I also made a handful of related changes to framework internals as a part of this work.