mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
Replaces react-shiki with a custom minimal Shiki highlighter to significantly reduce bundle size. Only loads 29 common languages and 2 themes (github-light/dark), using the JavaScript RegExp engine instead of WASM. - Reduced web bundle from 5.8MB to 2.5MB (57% reduction) - Saves 622KB by avoiding WASM runtime - Graceful fallback for unsupported languages - Removed react-shiki dependency - Added @shikijs/langs, @shikijs/themes, shiki, hast-util-to-jsx-runtime - Added light mode CSS rules for syntax highlighting
42 lines
1.2 KiB
JSON
42 lines
1.2 KiB
JSON
{
|
|
"name": "hapi-web",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"typecheck": "tsc --noEmit",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@assistant-ui/react": "^0.11.51",
|
|
"@assistant-ui/react-markdown": "^0.11.8",
|
|
"@radix-ui/react-dialog": "^1.1.2",
|
|
"@radix-ui/react-slot": "^1.2.0",
|
|
"@shikijs/langs": "^3.20.0",
|
|
"@shikijs/themes": "^3.20.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"diff": "^7.0.0",
|
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
"react": "^19.2.3",
|
|
"react-dom": "^19.2.3",
|
|
"react-textarea-autosize": "^8.5.9",
|
|
"remark-gfm": "^4.0.1",
|
|
"shiki": "^3.20.0",
|
|
"socket.io-client": "^4.8.1",
|
|
"tailwind-merge": "^2.5.5"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^19.2.7",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^4.3.4",
|
|
"autoprefixer": "^10.4.20",
|
|
"postcss": "^8.4.49",
|
|
"tailwindcss": "^3.4.15",
|
|
"typescript": "^5.7.2",
|
|
"vite": "^5.4.11"
|
|
}
|
|
}
|