react-ace v14 is CommonJS-only with no ESM entry point, making it fundamentally incompatible with Vite's ESM-first dev server. Every CJS interop workaround failed. Switched to @uiw/react-codemirror v4.25 which ships proper dual ESM+CJS and works with Vite out of the box. Changes: - Remove ace-builds and react-ace dependencies - Add @uiw/react-codemirror + 16 @codemirror/lang-* packages - Add @uiw/codemirror-theme-tomorrow-night-blue (closest to ACE's 'tomorrow') - Add @replit/codemirror-lang-csharp for C# support - Rewrite EditorPanel.tsx: delete 108 lines of ACE boilerplate (?url imports, setModuleUrl, CJS interop hack), replace with ~30 lines of clean CodeMirror language extension setup - Delete vite.d.ts (only needed for ACE ?url import types) - Remove optimizeDeps.include from vite.config.ts (not needed for CM) - Add CodeMirror flex layout CSS to index.css Supported languages: JavaScript/JSX, TypeScript/TSX, Python, JSON, HTML, CSS, Less, YAML, Markdown, SQL, Java, Go, Rust, C/C++, C#, PHP, XML. Unsupported types fall back to plain text. Verified: tsc clean, vite build passes, heartbeat worker intact.
36 lines
1.2 KiB
JSON
36 lines
1.2 KiB
JSON
{
|
|
"name": "gadget-code-frontend",
|
|
"version": "1.0.0",
|
|
"description": "Gadget Code Frontend - A self-hosted Agentic Engineering Platform (AEP).",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"typecheck": "tsc --noEmit",
|
|
"build": "tsc --noEmit && vite build"
|
|
},
|
|
"author": "Robert Colbert <rob.colbert@openplatform.us>",
|
|
"license": "Apache-2.0",
|
|
"dependencies": {
|
|
"@codemirror/lang-cpp": "^6.0.3",
|
|
"@codemirror/lang-css": "^6.3.1",
|
|
"@codemirror/lang-go": "^6.0.1",
|
|
"@codemirror/lang-html": "^6.4.11",
|
|
"@codemirror/lang-java": "^6.0.2",
|
|
"@codemirror/lang-javascript": "^6.2.5",
|
|
"@codemirror/lang-json": "^6.0.2",
|
|
"@codemirror/lang-less": "^6.0.2",
|
|
"@codemirror/lang-markdown": "^6.5.0",
|
|
"@codemirror/lang-php": "^6.0.2",
|
|
"@codemirror/lang-python": "^6.2.1",
|
|
"@codemirror/lang-rust": "^6.0.2",
|
|
"@codemirror/lang-sql": "^6.10.0",
|
|
"@codemirror/lang-xml": "^6.1.0",
|
|
"@codemirror/lang-yaml": "^6.1.3",
|
|
"@replit/codemirror-lang-csharp": "^6.2.0",
|
|
"@uiw/codemirror-theme-tomorrow-night-blue": "^4.25.9",
|
|
"@uiw/react-codemirror": "^4.25.9",
|
|
"marked": "^16.4.2",
|
|
"slug": "^11.0.1"
|
|
}
|
|
}
|