-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
fix(css): resolve relative imports in sass properly on Windows #19920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sapphi-red
merged 1 commit into
vitejs:main
from
sapphi-red:fix/css-sass-relative-windows-properly
Apr 24, 2025
Merged
fix(css): resolve relative imports in sass properly on Windows #19920
sapphi-red
merged 1 commit into
vitejs:main
from
sapphi-red:fix/css-sass-relative-windows-properly
Apr 24, 2025
+5
−1
Conversation
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
bluwy
approved these changes
Apr 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me 👍
renovate bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Apr 27, 2025
| datasource | package | from | to | | ---------- | ------- | ----- | ----- | | npm | vite | 6.3.2 | 6.3.3 | ## [v6.3.3](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small633-2025-04-24-small) - fix: ignore malformed uris in tranform middleware ([#19853](vitejs/vite#19853)) ([e4d5201](vitejs/vite@e4d5201)), closes [#19853](vitejs/vite#19853) - fix(assets): ensure ?no-inline is not included in the asset url in the production environment ([#1949](vitejs/vite#1949) ([16a73c0](vitejs/vite@16a73c0)), closes [#19496](vitejs/vite#19496) - fix(css): resolve relative imports in sass properly on Windows ([#19920](vitejs/vite#19920)) ([ffab442](vitejs/vite@ffab442)), closes [#19920](vitejs/vite#19920) - fix(deps): update all non-major dependencies ([#19899](vitejs/vite#19899)) ([a4b500e](vitejs/vite@a4b500e)), closes [#19899](vitejs/vite#19899) - fix(ssr): fix execution order of re-export ([#19841](vitejs/vite#19841)) ([ed29dee](vitejs/vite@ed29dee)), closes [#19841](vitejs/vite#19841) - fix(ssr): fix live binding of default export declaration and hoist exports getter ([#19842](vitejs/vite#19842)) ([80a91ff](vitejs/vite@80a91ff)), closes [#19842](vitejs/vite#19842) - perf: skip sourcemap generation for renderChunk hook of import-analysis-build plugin ([#19921](vitejs/vite#19921)) ([55cfd04](vitejs/vite@55cfd04)), closes [#19921](vitejs/vite#19921) - test(ssr): test `ssrTransform` re-export deps and test stacktrace with first line ([#19629](vitejs/vite#19629)) ([9399cda](vitejs/vite@9399cda)), closes [#19629](vitejs/vite#19629)
renovate bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
May 2, 2025
| datasource | package | from | to | | ---------- | ------- | ----- | ----- | | npm | vite | 6.3.2 | 6.3.4 | ## [v6.3.4](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small634-2025-04-30-small) - fix: check static serve file inside sirv ([#19965](vitejs/vite#19965)) ([c22c43d](vitejs/vite@c22c43d)), closes [#19965](vitejs/vite#19965) - fix(optimizer): return plain object when using `require` to import externals in optimized dependenci ([efc5eab](vitejs/vite@efc5eab)), closes [#19940](vitejs/vite#19940) - refactor: remove duplicate plugin context type ([#19935](vitejs/vite#19935)) ([d6d01c2](vitejs/vite@d6d01c2)), closes [#19935](vitejs/vite#19935) ## [v6.3.3](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small633-2025-04-24-small) - fix: ignore malformed uris in tranform middleware ([#19853](vitejs/vite#19853)) ([e4d5201](vitejs/vite@e4d5201)), closes [#19853](vitejs/vite#19853) - fix(assets): ensure ?no-inline is not included in the asset url in the production environment ([#1949](vitejs/vite#1949) ([16a73c0](vitejs/vite@16a73c0)), closes [#19496](vitejs/vite#19496) - fix(css): resolve relative imports in sass properly on Windows ([#19920](vitejs/vite#19920)) ([ffab442](vitejs/vite@ffab442)), closes [#19920](vitejs/vite#19920) - fix(deps): update all non-major dependencies ([#19899](vitejs/vite#19899)) ([a4b500e](vitejs/vite@a4b500e)), closes [#19899](vitejs/vite#19899) - fix(ssr): fix execution order of re-export ([#19841](vitejs/vite#19841)) ([ed29dee](vitejs/vite@ed29dee)), closes [#19841](vitejs/vite#19841) - fix(ssr): fix live binding of default export declaration and hoist exports getter ([#19842](vitejs/vite#19842)) ([80a91ff](vitejs/vite@80a91ff)), closes [#19842](vitejs/vite#19842) - perf: skip sourcemap generation for renderChunk hook of import-analysis-build plugin ([#19921](vitejs/vite#19921)) ([55cfd04](vitejs/vite@55cfd04)), closes [#19921](vitejs/vite#19921) - test(ssr): test `ssrTransform` re-export deps and test stacktrace with first line ([#19629](vitejs/vite#19629)) ([9399cda](vitejs/vite@9399cda)), closes [#19629](vitejs/vite#19629)
renovate bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
May 3, 2025
| datasource | package | from | to | | ---------- | ------- | ----- | ----- | | npm | vite | 6.3.2 | 6.3.4 | ## [v6.3.4](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small634-2025-04-30-small) - fix: check static serve file inside sirv ([#19965](vitejs/vite#19965)) ([c22c43d](vitejs/vite@c22c43d)), closes [#19965](vitejs/vite#19965) - fix(optimizer): return plain object when using `require` to import externals in optimized dependenci ([efc5eab](vitejs/vite@efc5eab)), closes [#19940](vitejs/vite#19940) - refactor: remove duplicate plugin context type ([#19935](vitejs/vite#19935)) ([d6d01c2](vitejs/vite@d6d01c2)), closes [#19935](vitejs/vite#19935) ## [v6.3.3](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small633-2025-04-24-small) - fix: ignore malformed uris in tranform middleware ([#19853](vitejs/vite#19853)) ([e4d5201](vitejs/vite@e4d5201)), closes [#19853](vitejs/vite#19853) - fix(assets): ensure ?no-inline is not included in the asset url in the production environment ([#1949](vitejs/vite#1949) ([16a73c0](vitejs/vite@16a73c0)), closes [#19496](vitejs/vite#19496) - fix(css): resolve relative imports in sass properly on Windows ([#19920](vitejs/vite#19920)) ([ffab442](vitejs/vite@ffab442)), closes [#19920](vitejs/vite#19920) - fix(deps): update all non-major dependencies ([#19899](vitejs/vite#19899)) ([a4b500e](vitejs/vite@a4b500e)), closes [#19899](vitejs/vite#19899) - fix(ssr): fix execution order of re-export ([#19841](vitejs/vite#19841)) ([ed29dee](vitejs/vite@ed29dee)), closes [#19841](vitejs/vite#19841) - fix(ssr): fix live binding of default export declaration and hoist exports getter ([#19842](vitejs/vite#19842)) ([80a91ff](vitejs/vite@80a91ff)), closes [#19842](vitejs/vite#19842) - perf: skip sourcemap generation for renderChunk hook of import-analysis-build plugin ([#19921](vitejs/vite#19921)) ([55cfd04](vitejs/vite@55cfd04)), closes [#19921](vitejs/vite#19921) - test(ssr): test `ssrTransform` re-export deps and test stacktrace with first line ([#19629](vitejs/vite#19629)) ([9399cda](vitejs/vite@9399cda)), closes [#19629](vitejs/vite#19629)
renovate bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
May 4, 2025
| datasource | package | from | to | | ---------- | ------- | ----- | ----- | | npm | vite | 6.3.2 | 6.3.4 | ## [v6.3.4](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small634-2025-04-30-small) - fix: check static serve file inside sirv ([#19965](vitejs/vite#19965)) ([c22c43d](vitejs/vite@c22c43d)), closes [#19965](vitejs/vite#19965) - fix(optimizer): return plain object when using `require` to import externals in optimized dependenci ([efc5eab](vitejs/vite@efc5eab)), closes [#19940](vitejs/vite#19940) - refactor: remove duplicate plugin context type ([#19935](vitejs/vite#19935)) ([d6d01c2](vitejs/vite@d6d01c2)), closes [#19935](vitejs/vite#19935) ## [v6.3.3](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small633-2025-04-24-small) - fix: ignore malformed uris in tranform middleware ([#19853](vitejs/vite#19853)) ([e4d5201](vitejs/vite@e4d5201)), closes [#19853](vitejs/vite#19853) - fix(assets): ensure ?no-inline is not included in the asset url in the production environment ([#1949](vitejs/vite#1949) ([16a73c0](vitejs/vite@16a73c0)), closes [#19496](vitejs/vite#19496) - fix(css): resolve relative imports in sass properly on Windows ([#19920](vitejs/vite#19920)) ([ffab442](vitejs/vite@ffab442)), closes [#19920](vitejs/vite#19920) - fix(deps): update all non-major dependencies ([#19899](vitejs/vite#19899)) ([a4b500e](vitejs/vite@a4b500e)), closes [#19899](vitejs/vite#19899) - fix(ssr): fix execution order of re-export ([#19841](vitejs/vite#19841)) ([ed29dee](vitejs/vite@ed29dee)), closes [#19841](vitejs/vite#19841) - fix(ssr): fix live binding of default export declaration and hoist exports getter ([#19842](vitejs/vite#19842)) ([80a91ff](vitejs/vite@80a91ff)), closes [#19842](vitejs/vite#19842) - perf: skip sourcemap generation for renderChunk hook of import-analysis-build plugin ([#19921](vitejs/vite#19921)) ([55cfd04](vitejs/vite@55cfd04)), closes [#19921](vitejs/vite#19921) - test(ssr): test `ssrTransform` re-export deps and test stacktrace with first line ([#19629](vitejs/vite#19629)) ([9399cda](vitejs/vite@9399cda)), closes [#19629](vitejs/vite#19629)
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.
Description
fileURLToPath('file:///C:/foo.js', { windows: false })
returns/C:/foo.js
. Even with this output, it still worked because the internal resolve plugin supports that format (/C:/foo.js
) as well.vite/packages/vite/src/node/plugins/resolve.ts
Lines 262 to 274 in 16a73c0
But the expected result here for this input is
C:/foo.js
, and this PR fixes the condition to usewindows
option.