Skip to content
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

Deprecation Warning: Vite uses deprecated sass.render() API in Dart Sass #18199

Closed
7 tasks done
Gersondelacruzdeveloper opened this issue Sep 25, 2024 · 1 comment
Closed
7 tasks done

Comments

@Gersondelacruzdeveloper

Describe the bug

In projects using Vite (version 5.4.8) with Dart Sass for SCSS compilation, a deprecation warning appears regarding the use of the legacy JavaScript API in Dart Sass. The warning states that the sass.render() and sass.renderSync() methods are deprecated and will be removed in Dart Sass 2.0.0.

The deprecation warning is specifically triggered by Vite's internal code, which still references sass.render() in the following file:

vite/dist/node/chunks/dep-CDnG8rE7.js
Despite updating Vite and related dependencies to the latest versions, the deprecated API is still in use.

Reproduction

yarn create vite my-vite-app --template react cd my-vite-app

Steps to reproduce

Use Vite (5.4.8) in a project that compiles SCSS using Dart Sass.
Run the project and observe the console output.
A deprecation warning will appear about the sass.render() API.

System Info

LEASE_ARM64_T8103 arm64
Yarn 1.22.22
Node v22.2.0

Used Package Manager

npm

Logs

Deprecation Warning: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: https://sass-lang.com/d/legacy-js-api

Validations

@hi-ogawa
Copy link
Collaborator

Duplicate of #18164

Please follow sass's link https://sass-lang.com/d/legacy-js-api to address the warning on Vite. We plan to change the behavior on our side Vite 6.

@hi-ogawa hi-ogawa closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants