I get an error when building project
When I run the
Here are the contents of my files
vite.config.ts
tsconfig.json
npm run buildnpm run build command I get an errorerror TS6305: Output file '.../vite.config.d.ts' has not been built from source file '../vite.config.ts'.
The file is in the program because:
Matched by include pattern 'vite.config.ts' in '.../tsconfig.json'
tsconfig.json:28:22
28 "include": ["src", "vite.config.ts"],
~~~~~~~~~~~~~~~~
File is matched by include pattern specified here.
Found 1 error.error TS6305: Output file '.../vite.config.d.ts' has not been built from source file '../vite.config.ts'.
The file is in the program because:
Matched by include pattern 'vite.config.ts' in '.../tsconfig.json'
tsconfig.json:28:22
28 "include": ["src", "vite.config.ts"],
~~~~~~~~~~~~~~~~
File is matched by include pattern specified here.
Found 1 error.Here are the contents of my files
vite.config.ts
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
});import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [react()],
});tsconfig.json
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
},
"include": ["src", "vite.config.ts"],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
},
"include": ["src", "vite.config.ts"],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}