mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-06 14:11:35 +02:00
Major version bump for the frontend build: - vite ^7.3.2 -> ^8.0.16 - @vitejs/plugin-react ^5.1.1 -> ^5.2.0 Vite 8 swaps Rollup for Rolldown as the default bundler (Rust-backed, same plugin contract). The bump also lifts the transitive esbuild floor to 0.28.1, closing the last open advisory in the audit chain. vite.config.ts surface audited and unchanged: - defineConfig, Connect type - serveGcodeViewer configureServer middleware - server.proxy with WebSocket upgrade for /api/v1/ws - build.outDir / emptyOutDir / chunkSizeWarningLimit - resolve.alias for @ - base: '/' regression guard from #1221 vitest@4.1.8 already accepts vite 8 in its peer range (^6 || ^7 || ^8); no test-runner bump required. Node floor for vite 8 is ^20.19.0 || >=22.12.0; CI Node 20.x line satisfies this. Not taken: plugin-react v6 — it requires babel-plugin-react-compiler and @rolldown/plugin-babel as peers and is a separate scope.
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...
},
},
])