Sass legacy JS API → Sass modern API
easyThe Sass legacy JS API (renderSync/render) is deprecated. Modern API (compile/compileString) is faster, required by Vite 6+, and supports custom importers.
npm install sass@latest
Vite: css.preprocessorOptions.scss.api = 'modern-compiler'. Webpack sass-loader: api: 'modern-compiler'.
If calling Sass directly: sass.renderSync() → sass.compile(). sass.render() → sass.compileAsync(). Options format changed.
What this migration involves
Moving from Sass legacy JS API to Sass modern API is rated easy and takes about 0.5-1h on a typical project. The guide breaks it into 4 steps, 1 of which ship with runnable commands and 1 with a verification check.
Related migrations
FAQ
How long does migrating from Sass legacy JS API to Sass modern API take?
Around 0.5-1h for a typical project — 4 steps, difficulty rated easy, 1 of them with copy-paste commands.
Is moving from Sass legacy JS API to Sass modern API reversible?
No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your Sass legacy JS API data before you start.
What does Sass modern API cost compared to Sass legacy JS API?
Pricing for both tools is contact-based or not tracked yet.