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

render() and renderSync() are deprecated for the sass package #867

Open
Rezyan opened this issue Mar 15, 2023 · 2 comments
Open

render() and renderSync() are deprecated for the sass package #867

Rezyan opened this issue Mar 15, 2023 · 2 comments

Comments

@Rezyan
Copy link

Rezyan commented Mar 15, 2023

Hi,

After having created a performance issue for the sass package, I learned that the render() and renderSync() methods were deprecated and suffered from performance issues:

We can also notice it in the comments of the code:

renderSync

render

Ideally, we should suggest a way to use compile() and compileAsync() methods for the following lines:

gulpSass.compiler.render(opts, (error, obj) => {

filePush(file, gulpSass.compiler.renderSync(opts), callback);

Example from sass:

const sass = require('sass');

const result = sass.compile(scssFilename);

// OR

// Note that `compileAsync()` is substantially slower than `compile()`.
const result = await sass.compileAsync(scssFilename);
@nex3
Copy link
Contributor

nex3 commented Jul 19, 2024

Heads up: we (the Sass team) are going to start emitting deprecation warnings for uses of the legacy API pretty soon.

@cbratschi
Copy link

Since Sass 1.79.1 the deprecation warnings are now active:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants