-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
fix(css): fallback to sass when sass-embedded platform binary is missing #21002
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
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
When sass-embedded is installed but the platform-specific binary is unavailable (e.g., sass-embedded-freebsd-x64), Vite now automatically falls back to the sass package with a warning instead of failing the build.
sapphi-red
reviewed
Oct 28, 2025
sapphi-red
reviewed
Oct 30, 2025
sapphi-red
reviewed
Oct 31, 2025
sapphi-red
approved these changes
Oct 31, 2025
Member
sapphi-red
left a comment
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.
Thanks!
renovate bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Nov 8, 2025
| datasource | package | from | to | | ---------- | ------- | ------ | ----- | | npm | vite | 7.1.10 | 7.2.2 | ## [v7.2.2](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-722-2025-11-07-small) ##### Bug Fixes - revert "refactor: use fs.cpSync ([#21019](vitejs/vite#21019))" ([#21081](vitejs/vite#21081)) ([728c8ee](vitejs/vite@728c8ee)) ## [v7.2.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-721-2025-11-06-small) ##### Bug Fixes - **worker:** some worker asset was missing ([#21074](vitejs/vite#21074)) ([82d2d6c](vitejs/vite@82d2d6c)) ##### Code Refactoring - **build:** rename `indexOfMatchInSlice` to `findPreloadMarker` ([#21054](vitejs/vite#21054)) ([f83264f](vitejs/vite@f83264f)) ## [v7.2.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#720-2025-11-05) ##### Bug Fixes - **css:** fallback to sass when sass-embedded platform binary is missing ([#21002](vitejs/vite#21002)) ([b1fd616](vitejs/vite@b1fd616)) - **module-runner:** make `getBuiltins` response JSON serializable ([#21029](vitejs/vite#21029)) ([ad5b3bf](vitejs/vite@ad5b3bf)) - **types:** add undefined to optional properties for exactOptionalProperties type compatibility ([#21040](vitejs/vite#21040)) ([2833c55](vitejs/vite@2833c55)) ##### Miscellaneous Chores - **deps:** update rolldown-related dependencies ([#21047](vitejs/vite#21047)) ([e3a6a83](vitejs/vite@e3a6a83)) ## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12) Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details. ## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small) ##### Bug Fixes - **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5)) ##### Miscellaneous Chores - **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2)) ##### Code Refactoring - use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af)) ##### Build System - remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce)) - remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Nov 8, 2025
| datasource | package | from | to | | ---------- | ------- | ------ | ----- | | npm | vite | 7.1.10 | 7.2.2 | ## [v7.2.2](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-722-2025-11-07-small) ##### Bug Fixes - revert "refactor: use fs.cpSync ([#21019](vitejs/vite#21019))" ([#21081](vitejs/vite#21081)) ([728c8ee](vitejs/vite@728c8ee)) ## [v7.2.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-721-2025-11-06-small) ##### Bug Fixes - **worker:** some worker asset was missing ([#21074](vitejs/vite#21074)) ([82d2d6c](vitejs/vite@82d2d6c)) ##### Code Refactoring - **build:** rename `indexOfMatchInSlice` to `findPreloadMarker` ([#21054](vitejs/vite#21054)) ([f83264f](vitejs/vite@f83264f)) ## [v7.2.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#720-2025-11-05) ##### Bug Fixes - **css:** fallback to sass when sass-embedded platform binary is missing ([#21002](vitejs/vite#21002)) ([b1fd616](vitejs/vite@b1fd616)) - **module-runner:** make `getBuiltins` response JSON serializable ([#21029](vitejs/vite#21029)) ([ad5b3bf](vitejs/vite@ad5b3bf)) - **types:** add undefined to optional properties for exactOptionalProperties type compatibility ([#21040](vitejs/vite#21040)) ([2833c55](vitejs/vite@2833c55)) ##### Miscellaneous Chores - **deps:** update rolldown-related dependencies ([#21047](vitejs/vite#21047)) ([e3a6a83](vitejs/vite@e3a6a83)) ## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12) Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details. ## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small) ##### Bug Fixes - **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5)) ##### Miscellaneous Chores - **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2)) ##### Code Refactoring - use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af)) ##### Build System - remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce)) - remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot
added a commit
to andrei-picus-tink/auto-renovate
that referenced
this pull request
Nov 9, 2025
| datasource | package | from | to | | ---------- | ------- | ------ | ----- | | npm | vite | 7.1.10 | 7.2.2 | ## [v7.2.2](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-722-2025-11-07-small) ##### Bug Fixes - revert "refactor: use fs.cpSync ([#21019](vitejs/vite#21019))" ([#21081](vitejs/vite#21081)) ([728c8ee](vitejs/vite@728c8ee)) ## [v7.2.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-721-2025-11-06-small) ##### Bug Fixes - **worker:** some worker asset was missing ([#21074](vitejs/vite#21074)) ([82d2d6c](vitejs/vite@82d2d6c)) ##### Code Refactoring - **build:** rename `indexOfMatchInSlice` to `findPreloadMarker` ([#21054](vitejs/vite#21054)) ([f83264f](vitejs/vite@f83264f)) ## [v7.2.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#720-2025-11-05) ##### Bug Fixes - **css:** fallback to sass when sass-embedded platform binary is missing ([#21002](vitejs/vite#21002)) ([b1fd616](vitejs/vite@b1fd616)) - **module-runner:** make `getBuiltins` response JSON serializable ([#21029](vitejs/vite#21029)) ([ad5b3bf](vitejs/vite@ad5b3bf)) - **types:** add undefined to optional properties for exactOptionalProperties type compatibility ([#21040](vitejs/vite#21040)) ([2833c55](vitejs/vite@2833c55)) ##### Miscellaneous Chores - **deps:** update rolldown-related dependencies ([#21047](vitejs/vite#21047)) ([e3a6a83](vitejs/vite@e3a6a83)) ## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12) Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details. ## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small) ##### Bug Fixes - **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5)) ##### Miscellaneous Chores - **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2)) ##### Code Refactoring - use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af)) ##### Build System - remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce)) - remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
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.
Fixes #19518
Description
When sass-embedded is installed but the platform-specific binary is unavailable (e.g., sass-embedded-freebsd-x64), Vite now automatically falls back to the sass package with a warning instead of failing the build.
I tested this locally using a Docker container to emulate the freebsd-x64 platform that was unable to install sass-embedded and was able to verify that it fails without my changes, and that it falls back to sass with my changes.