Files
cerebellum.neuroinf.jp/package.json
T
orrisroot a14bc6dd4b feat: migrate from Create React App to Vite
react-scripts 4 on React 17 no longer builds on a current toolchain.
Move to Vite 8 with React 19 and TypeScript 7, and take the same
shape the other two converted sites settled on.

- react-router-dom v5 -> react-router v8: Switch/Redirect become
  Routes/Navigate, and withRouter and RouteComponentProps give way to
  useParams, useLocation and useNavigate
- swap the unmaintained dependencies: axios -> ky, react-html-parser
  -> @orrisroot/react-html-parser, react-ga -> react-ga4,
  react-helmet -> @dr.pogodin/react-helmet, react-image-lightbox ->
  yet-another-react-lightbox, moment -> date-fns, and a local
  HashLink in place of react-router-hash-link
- drop react-app-polyfill, the jest setup and xregexp
- replace ESLint with Biome, and match the other sites' tsconfigs
- serve the dumped JSON from static-contents/modules/ at runtime
  instead of compiling it into the bundle, and mount that directory
  with sirv in both the dev and preview servers
- lazy-load NewArticleAlert: at 342 kB of static bibliography it is
  the largest file in the app and only ever renders on the top page,
  which cuts the entry chunk from 580 kB to 200 kB
- restate the theme sizes the modules/ move and border-box need, and
  keep the browser's own font on form controls
- set the GA4 measurement ID replacing the shut-down UA property
- write down the deployment procedure
2026-09-11 21:25:39 +09:00

44 lines
1.2 KiB
JSON

{
"name": "cerebellum",
"version": "2.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"lint": "biome lint",
"format": "biome format --write",
"check": "biome check --write"
},
"dependencies": {
"@dr.pogodin/react-helmet": "^3.2.3",
"@orrisroot/react-html-parser": "^3.0.1",
"async-lock": "^1.4.1",
"date-fns": "^4.4.0",
"ky": "^2.1.0",
"lokijs": "^1.5.12",
"modern-normalize": "^3.0.1",
"rc-tree": "^5.13.1",
"react": "^19.3.0",
"react-cookie": "^8.1.2",
"react-dom": "^19.3.0",
"react-ga4": "^3.0.1",
"react-overlays": "^5.2.1",
"react-router": "^8.3.1",
"yet-another-react-lightbox": "^3.32.2"
},
"devDependencies": {
"@biomejs/biome": "^2.5.13",
"@types/async-lock": "^1.4.2",
"@types/lokijs": "^1.5.14",
"@types/node": "^24.13.4",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.1",
"sirv": "^3.0.2",
"typescript": "~7.0.2",
"vite": "^8.3.0"
}
}