fix: resolve Sass alias imports via loadPaths instead of absolute paths for Windows compatibility#70
Merged
Merged
Conversation
❌ Deploy Preview for to-unocss failed. Why did it fail? →
|
…n on Windows On Windows, absolute paths like C:/Users/... in @use statements cause Sass to misinterpret the drive letter (C:) as a URL scheme, resulting in "Can't find stylesheet to import" errors. Fix: when resolveAlias matches, add the alias root directory to Sass's loadPaths and rewrite the import to use the relative suffix instead of an absolute path. This works cross-platform since Sass searches loadPaths for non-absolute, non-relative imports. Co-authored-by: Simon-He95 <57086651+Simon-He95@users.noreply.github.com> Agent-Logs-Url: https://github.com/Simon-He95/transformToUnoCSS/sessions/61fc13c4-5fa8-44a4-a16a-598c17a36bd4
Deploying transformtounocss with
|
| Latest commit: |
493a07d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://be7df814.transformtounocss.pages.dev |
| Branch Preview URL: | https://copilot-fix-ci-windows-test.transformtounocss.pages.dev |
Co-authored-by: Simon-He95 <57086651+Simon-He95@users.noreply.github.com> Agent-Logs-Url: https://github.com/Simon-He95/transformToUnoCSS/sessions/61fc13c4-5fa8-44a4-a16a-598c17a36bd4
Copilot
AI
changed the title
[WIP] Fix CI Windows test failure due to file path issues
fix: resolve Sass alias imports via loadPaths instead of absolute paths for Windows compatibility
Mar 26, 2026
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.
Windows CI fails because Sass misinterprets drive letters (
C:) in absolute@usepaths as URL schemes, producing "Can't find stylesheet to import" errors.From CI logs:
Change
When
resolveAliasmatches an import like@/styles/tokens:@use "C:/Users/.../src/styles/tokens"(breaks on Windows)loadPathsand rewrites to relative suffix →@use "styles/tokens"Also extracted duplicated
getAliasSuffixhelper into a shared function.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.