GeezerVison is showing github.com — Remove Sass legacy JS API build warnings · Issue #805 · algorithm-visualizer/algorithm-visualizer
Remove Sass legacy JS API build warnings #805
Description
Problem
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 [email protected] with [email protected]; 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 commented on May 4, 2026
Implemented locally on branch codex/issue-805-sass-modern-loader.
What changed:
scripts/react-scripts.js now preloads a small Sass loader hook for non-eject CRA scripts.
- Added
scripts/sass-modern-loader.js, which compiles SCSS through Dart Sass compileStringAsync() instead of the legacy render() API.
- Added a webpack-like importer for the repo's current
~common/... SCSS imports and jsconfig.json baseUrl: src resolution.
Verification:
npm run build passes with no legacy-js-api warnings.
npm test -- --watchAll=false passes.
BROWSER=none PORT=3017 npm start compiles successfully with no legacy-js-api warnings.
Remaining unrelated warnings observed: Node util._extend deprecation and outdated Browserslist data.
Metadata
Metadata
Development
No branches or pull requestsIssue actions