Skip to content

Commit d5ad7cc

Browse files
committed
Fix vite build command
1 parent 662ecb5 commit d5ad7cc

File tree

5 files changed

+18
-26
lines changed

5 files changed

+18
-26
lines changed

.gitignore

+1-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
9-
10-
node_modules
11-
dist
12-
dist-ssr
13-
*.local
14-
15-
# Editor directories and files
16-
.vscode/*
17-
!.vscode/extensions.json
18-
.idea
19-
.DS_Store
20-
*.suo
21-
*.ntvs*
22-
*.njsproj
23-
*.sln
24-
*.sw?
1+
tsconfig.tsbuildinfo

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"allowImportingTsExtensions": true,
1212
"resolveJsonModule": true,
1313
"isolatedModules": true,
14-
"noEmit": true,
14+
"emitDeclarationOnly": true,
15+
"composite": true,
1516
"jsx": "react-jsx",
1617

1718
/* Paths */

tsconfig.node.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"allowImportingTsExtensions": true,
1313
"isolatedModules": true,
1414
"moduleDetection": "force",
15-
"noEmit": true,
15+
"emitDeclarationOnly": true,
1616

1717
/* Linting */
1818
"strict": true,

vite.config.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const _default: import("vite").UserConfig;
2+
export default _default;

vite.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from 'vite';
2+
import react from '@vitejs/plugin-react';
3+
import path from 'path';
4+
// https://vitejs.dev/config/
5+
export default defineConfig({
6+
plugins: [react()],
7+
resolve: {
8+
alias: {
9+
'@': path.resolve(__dirname, './src'),
10+
},
11+
},
12+
});

0 commit comments

Comments
 (0)