Repository navigation
[heft-sass-plugin] Honor package exports for Sass imports - #6161
Open
Ian Clanton-Thuon (iclanton) wants to merge 1 commit into
Open
Ian Clanton-Thuon (iclanton) wants to merge 1 commit into
Ian Clanton-Thuon (iclanton) wants to merge 1 commit into
Conversation
Resolve Sass-aware package entry points while preserving Heft loading, dependency tracking, source maps, and legacy imports. Add regression coverage and document the supported resolution behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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
Allow
@rushstack/heft-sass-pluginto consume packages that expose stylesheets throughpackage.jsonexports instead of requiring imports of their physical source paths. Support Sass-aware root exports, subpaths, wildcard patterns, and top-levelsass/styleentry points.Details
resolve-pkg-mapsto match export maps with thesass,style, anddefaultconditions in manifest order. Apply Sass's extension, partial, and index-file lookup to exported subpaths; require complete stylesheet filenames in export targets.NodePackageImporter, preserving preprocessing, dependency tracking, incremental recompilation, and source maps.pkg:imports, legacy~imports, and opt-in bare package imports. Relative/load-path precedence and the default behavior for bare specifiers remain unchanged.How it was tested
rush build --only @rushstack/heft-sass-plugin- passed.rush retest --only @rushstack/heft-sass-plugin- passed on the final commit, including build/lint and all 99 tests.rush install --to @rushstack/heft-sass-plugin- passed lockfile and repository-state validation.common/autoinstallers/rush-prettier/node_modules/.bin/prettier --check heft-plugins/heft-sass-plugin/src/SassProcessor.ts heft-plugins/heft-sass-plugin/src/test/SassProcessor.test.ts heft-plugins/heft-sass-plugin/package.json- passed.git diff --cached --check- passed; the pre-commit formatting hook also passed.Regression coverage includes scoped packages, root/subpath exports, condition ordering, arrays, wildcard/exact mappings, Sass partials and index files, encoded paths, CSS and indented Sass, legacy/bare imports, entry-point fallbacks, invalid/missing/ambiguous targets, source maps, and dependency-triggered recompilation.
Impacted documentation
Updated the heft-sass-plugin README with package entry-point examples and resolution rules. No website documentation or JSON schemas were changed.