Skip to content

Commit f0d5eca

Browse files
committed
vite plugins updates
1 parent ee77ad3 commit f0d5eca

File tree

2 files changed

+49
-10
lines changed

2 files changed

+49
-10
lines changed

tsconfig.json

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,53 @@
22
"compilerOptions": {
33
"target": "ES2020",
44
"useDefineForClassFields": true,
5-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
5+
"lib": [
6+
"ES2020",
7+
"DOM",
8+
"DOM.Iterable"
9+
],
610
"module": "ESNext",
711
"skipLibCheck": true,
8-
912
/* Bundler mode */
1013
"moduleResolution": "bundler",
1114
"allowImportingTsExtensions": true,
1215
"resolveJsonModule": true,
1316
"isolatedModules": true,
1417
"noEmit": true,
1518
"jsx": "react-jsx",
16-
1719
/* Linting */
1820
"strict": true,
1921
"noUnusedLocals": true,
2022
"noUnusedParameters": true,
21-
"noFallthroughCasesInSwitch": true
23+
"noFallthroughCasesInSwitch": true,
24+
"baseUrl": ".",
25+
"paths": {
26+
"#assets/*": [
27+
"src/assets/*"
28+
],
29+
"#components/*": [
30+
"src/components/*"
31+
],
32+
"#data/*": [
33+
"src/data/*"
34+
],
35+
"#routes/*": [
36+
"src/routes/*"
37+
],
38+
"#store/*": [
39+
"src/store/*"
40+
],
41+
"#/*": [
42+
"src/*"
43+
]
44+
}
2245
},
23-
"include": ["src"],
24-
"references": [{ "path": "./tsconfig.node.json" }]
25-
}
46+
"include": [
47+
"src"
48+
],
49+
"references": [
50+
{
51+
"path": "./tsconfig.node.json"
52+
}
53+
]
54+
}

vite.config.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
import react from '@vitejs/plugin-react-swc';
2+
import dns from 'dns';
23
import { defineConfig } from 'vite';
4+
import { ViteAliases } from 'vite-aliases';
5+
import mkcert from 'vite-plugin-mkcert';
36
import svgr from 'vite-plugin-svgr';
47

5-
// https://vitejs.dev/config/
8+
dns.setDefaultResultOrder('verbatim');
9+
610
export default defineConfig({
7-
plugins: [react(), svgr()],
11+
plugins: [
12+
react(),
13+
svgr(),
14+
mkcert(),
15+
ViteAliases({
16+
prefix: '#',
17+
}),
18+
],
819
server: {
920
port: 5555,
10-
strictPort: true,
1121
open: true,
1222
},
1323
preview: {

0 commit comments

Comments
 (0)