72168e0b0afc20325ae287646c66771aebf5beca
`npm audit fix` cleared 23 vulnerabilities (14 high) entirely within existing semver ranges - lockfile only, no package.json version changes. `npm update` then pulled in-range updates including react 19.2 -> 19.3 and @base-ui/react 1.2 -> 1.8. shadcn, tailwindcss, @tailwindcss/vite and tw-animate-css move to devDependencies. shadcn in particular is a scaffolding CLI with zero runtime imports that was dragging msw, @modelcontextprotocol/sdk, @babel/core and ts-morph into the production dependency tree - the tree `npm ci --omit=dev` installs and the Trivy filesystem scan reads. The production image is nginx serving dist/, so none of them ever shipped; they were simply misclassified. The build stage installs all dependencies, so the production build is unaffected. The react-hooks plugin update (7.0.1 -> 7.1.1) caught five more set-state-in-effect cases, all fixed rather than suppressed: - SearchAutocomplete derives "query too short" and its loading/error state from which search has settled, instead of clearing state on every keystroke below the threshold; the mode-change reset moves to a render-phase adjustment, which also keeps focus that remounting via a `key` would have dropped mid-chain. - Leaderboard uses the same derived request-key pattern as the other list pages, and gains the cancellation it was missing. - Hint visibility is derived from the chain length the hints were fetched for, rather than cleared by an effect. - The async submit guard becomes a ref: as state it was both the guard and a dependency, so setting it re-ran its own effect. Verified in the browser: search, the mode reset, the Base UI dialog and a full scored game all behave correctly, and the production image builds.
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
Languages
TypeScript
97.7%
CSS
0.8%
JavaScript
0.7%
Shell
0.4%
Dockerfile
0.2%
Other
0.2%