renderSync
- renderSync(options: LegacyOptions<"sync">): LegacyResult
-
Parameters
-
options: LegacyOptions<"sync">
Returns LegacyResult
-
© 2006–2025 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/functions/renderSync
This function synchronously compiles a Sass file to CSS. If it succeeds, it returns the result, and if it fails it throws an error.
When using the
sass-embeddednpm package, render is almost always faster than renderSync, due to the overhead of emulating synchronous messaging with worker threads and concurrent compilations being blocked on main thread.Example
Deprecated
Use compile or compileString instead.