This template provides a minimal setup to get React working in Vite with HMR, ESLint rules, and a scalable stylesheet architecture.
Styling is built entirely with modern, native CSS features rather than utility frameworks. The architecture leverages:
- Cascade Layers (
@layer) for explicit specificity control and base resetting. - Native Nesting for cleaner, preprocessor-free style organization.
- Scope (
@scope) for robust, native style encapsulation at the component level.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
The React Compiler is enabled on this template. See this documentation for more information.
Note: This will impact Vite dev & build performances.
For production applications, updating the configuration to enable type-aware lint rules is highly recommended:
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...
},
},
])