render
- render(options: LegacyOptions<"async">, callback: ((exception?: LegacyException, result?: LegacyResult) => void)): void
-
Parameters
-
options: LegacyOptions<"async">
-
callback: ((exception?: LegacyException, result?: LegacyResult) => void)
-
- (exception?: LegacyException, result?: LegacyResult): void
-
Parameters
-
Optionalexception: LegacyException -
Optionalresult: LegacyResult
Returns void
-
-
Returns void
-
© 2006–2025 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/functions/render
This function asynchronously compiles a Sass file to CSS, and calls
callbackwith a LegacyResult if compilation succeeds or LegacyException if it fails.When using the
sassnpm package, renderSync is almost twice as fast as render by default, due to the overhead of making the entire evaluation process asynchronous.Deprecated
Use compileAsync or compileStringAsync instead.