Vite при компиляции не видит ошибки Typescript, как исправить?

Возникла проблема, Vite сборщик перестал отображать ошибки typescript в браузере, хотя раньше отображал
Вот конфиг vite.config.ts
// vite.config.js
import { defineConfig } from "vite";
import checker from "vite-plugin-checker";
import react from "@vitejs/plugin-react";
import svgrPlugin from "vite-plugin-svgr";
import ESLint from 'vite-plugin-eslint'

// https://vitejs.dev/config/
export default defineConfig({
	plugins: [
		react(),
		checker({
			typescript: true,
			eslint: {
				lintCommand: 'eslint "./src/**/*.{ts,tsx}"'
			}
		}),
		svgrPlugin(),
	],
	server: {
		port: 3000
	},
	resolve: {
		alias: {
			src: "/src",
		},
	},
})


Вот tsconfig.json
{
  "compilerOptions": {
    "target": "ES2020",
    "useDefineForClassFields": true,
    "module": "ESNext",
    "skipLibCheck": true,
    /* Bundler mode */
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true ,
    "jsx": "react-jsx",

    /* Linting */
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
    "types": ["vite-plugin-svgr/client"],
    "baseUrl": ".",
    "paths": {
      "src/*": ["src/*"]
    }
  },
  "include": ["src", "src/components", "src/custom.d.ts"],
  "references": [{ "path": "./tsconfig.node.json" }]
}


Вот packagejson
{
  "name": "euro_sound",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "start": "vite",
    "build": "tsc && vite build",
    "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
    "preview": "vite preview"
  },
  "dependencies": {
    "@ant-design/icons": "^5.1.4",
    "@types/node": "^20.3.2",
    "@types/query-string": "^6.3.0",
    "@types/react-datepicker": "^4.11.2",
    "antd": "^5.6.3",
    "dayjs": "^1.11.8",
    "mobx": "^6.9.0",
    "mobx-react-lite": "^3.4.3",
    "normalize.css": "^8.0.1",
    "query-string": "^8.1.0",
    "react": "^18.2.0",
    "react-datepicker": "^4.15.0",
    "react-dom": "^18.2.0",
    "react-hook-form": "^7.45.1",
    "react-responsive": "^9.0.2",
    "react-router-dom": "^6.14.0"
  },
  "devDependencies": {
    "@types/react": "^18.0.37",
    "@types/react-dom": "^18.0.11",
    "@typescript-eslint/eslint-plugin": "^5.61.0",
    "@typescript-eslint/parser": "^5.61.0",
    "@vitejs/plugin-react": "^4.0.0",
    "eslint": "^8.38.0",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-refresh": "^0.3.4",
    "prettier": "^2.8.8",
    "sass": "^1.63.6",
    "typescript": "^5.0.2",
    "vite": "^4.3.9",
    "vite-plugin-checker": "^0.6.1",
    "vite-plugin-svgr": "^3.2.0"
  }
}


Вот элементраный пример из кода
64a54a09038ea681705533.png

Что самое забавное, раньше работал, так же в этом плагине есть linter и он работает отлично
  • Вопрос задан
  • 678 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы