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
-
Optional
exception: LegacyException -
Optional
result: LegacyResult
Returns void
-
-
Returns void
-
This function asynchronously compiles a Sass file to CSS, and calls
callback
with a LegacyResult if compilation succeeds or LegacyException if it fails.⚠️ Heads up!
When using the
sass
npm 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.