duooomi
Go to file
肖宇迪 852748b645 更新 vite.config.ts 2026-01-04 13:52:12 +08:00
public first commit 2025-12-22 17:00:33 +08:00
src css 2025-12-23 10:07:48 +08:00
.gitignore first commit 2025-12-22 17:00:33 +08:00
Dockerfile 更新 Dockerfile 2025-12-26 18:11:03 +08:00
README.md first commit 2025-12-22 17:00:33 +08:00
docker-compose.yaml 更新 docker-compose.yaml 2025-12-26 18:06:12 +08:00
eslint.config.js first commit 2025-12-22 17:00:33 +08:00
index.html fix: 内容 2025-12-22 17:14:27 +08:00
package-lock.json first commit 2025-12-22 17:00:33 +08:00
package.json first commit 2025-12-22 17:00:33 +08:00
tsconfig.app.json first commit 2025-12-22 17:00:33 +08:00
tsconfig.json first commit 2025-12-22 17:00:33 +08:00
tsconfig.node.json first commit 2025-12-22 17:00:33 +08:00
vite.config.ts 更新 vite.config.ts 2026-01-04 13:52:12 +08:00

README.md

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:

React Compiler

The React Compiler is enabled on this template. See this documentation for more information.

Note: This will impact Vite dev & build performances.

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...
    },
  },
])