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
Vite recommends updating eslint when developing a production application:
- Replace
plugin:@typescript-eslint/recommended
toplugin:@typescript-eslint/recommended-type-checked
orplugin:@typescript-eslint/strict-type-checked
When switching to this rule-set, TS loses proper typing for the test/utils.tsx
exports when importing via alias. One solution is turning the offending rules off specifically in test files. See this config option.