create-react-app
create-react-app copied to clipboard
feat(react-scripts): support JSON with comments in jsconfig.json (#7426)
Problem: jsconfig.json with comments (JSONC) fails to parse in non-TypeScript projects.
Change: In packages/react-scripts/config/modules.js, when jsconfig.json exists: Try to resolve typescript from app node_modules; if available, parse with ts.readConfigFile (supports JSONC). Otherwise, fallback to strict JSON.parse; on failure, show a clear message suggesting to install TypeScript (dev dependency) to enable JSONC support.
Impact: Projects can use comments in jsconfig.json without requiring TypeScript globally; strict JSON still works without extra deps.