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:
const sass = require('sass');
const result = sass.compile(scssFilename);
// OR
// Note that `compileAsync()` is substantially slower than `compile()`.
const result = await sass.compileAsync(scssFilename);
Hi,
After having created a performance issue for the
sass
package, I learned that therender()
andrenderSync()
methods were deprecated and suffered from performance issues:We can also notice it in the comments of the code:
Ideally, we should suggest a way to use
compile()
andcompileAsync()
methods for the following lines:https://github.com/dlmanning/gulp-sass/blob/c04bb67043fdbcb930152232ee9ba4caff0b2599/index.js#L145
https://github.com/dlmanning/gulp-sass/blob/c04bb67043fdbcb930152232ee9ba4caff0b2599/index.js#L158
Example from
sass
: