You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running npm run build emits repeated Dart Sass deprecation warnings:
DEPRECATION WARNING [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
The warning appears once for each SCSS compilation. The current build stack uses react-scripts@3.0.1 with sass-loader@10.5.2; that loader calls Dart Sass through the legacy render() API.
Why it matters
Dart Sass 2.0.0 will remove the legacy JS API, so this is future breakage rather than just noisy output.
Acceptance criteria
npm run build completes without any legacy-js-api Sass warnings.
The SCSS/CSS output remains equivalent for the existing app.
The fix keeps the CRA 3 build wrapper working on the current Node baseline.
Activity
yuyu1815 commentedon May 4, 2026
Implemented locally on branch
codex/issue-805-sass-modern-loader.What changed:
scripts/react-scripts.jsnow preloads a small Sass loader hook for non-eject CRA scripts.scripts/sass-modern-loader.js, which compiles SCSS through Dart SasscompileStringAsync()instead of the legacyrender()API.~common/...SCSS imports andjsconfig.jsonbaseUrl: srcresolution.Verification:
npm run buildpasses with nolegacy-js-apiwarnings.npm test -- --watchAll=falsepasses.BROWSER=none PORT=3017 npm startcompiles successfully with nolegacy-js-apiwarnings.Remaining unrelated warnings observed: Node
util._extenddeprecation and outdated Browserslist data.