fix(misc): use pathToFileURL for cross-platform path handling in postcss-cli-resources#34676
Merged
FrozenPandaz merged 1 commit intomasterfrom Mar 3, 2026
Merged
fix(misc): use pathToFileURL for cross-platform path handling in postcss-cli-resources#34676FrozenPandaz merged 1 commit intomasterfrom
FrozenPandaz merged 1 commit intomasterfrom
Conversation
…css-cli-resources Replace manual `new URL(path, 'file:///')` with Node's `pathToFileURL` for correct cross-platform file path to URL conversion in CSS url() resolution.
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit 7beb52a
☁️ Nx Cloud last updated this comment at |
bigcakes
approved these changes
Mar 3, 2026
FrozenPandaz
approved these changes
Mar 3, 2026
FrozenPandaz
pushed a commit
that referenced
this pull request
Mar 4, 2026
…css-cli-resources (#34676) ## Current Behavior CSS `url()` references to fonts and assets fail to resolve on Windows with webpack, rspack, and angular-rspack builds. The `postcss-cli-resources` plugin passes Windows absolute paths (e.g. `E:\dev\project\font.woff2`) to `new URL(path, 'file:///')`, which misinterprets the drive letter (`E:`) as a URL protocol, stripping it from `pathname` and producing unresolvable paths like `\dev\project\font.woff2`. ## Expected Behavior CSS `url()` references to fonts, images, and other assets resolve correctly on all platforms. ## Related Issue(s) Fixes #33052 (cherry picked from commit e81f187)
Contributor
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Current Behavior
CSS
url()references to fonts and assets fail to resolve on Windows with webpack, rspack, and angular-rspack builds. Thepostcss-cli-resourcesplugin passes Windows absolute paths (e.g.E:\dev\project\font.woff2) tonew URL(path, 'file:///'), which misinterprets the drive letter (E:) as a URL protocol, stripping it frompathnameand producing unresolvable paths like\dev\project\font.woff2.Expected Behavior
CSS
url()references to fonts, images, and other assets resolve correctly on all platforms.Related Issue(s)
Fixes #33052