File tree Expand file tree Collapse file tree 7 files changed +57
-35
lines changed
Expand file tree Collapse file tree 7 files changed +57
-35
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ npm run i18n:check
206206 components/ui/*
207207 lib/*
208208 types/host.d.ts
209- vite.config.ts
209+ vite.config.mts
210210/tailwind.config.js
211211/postcss.config.js
212212/package.json
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ adapters/TerminalAdapter.tsx
206206components/ui/*
207207lib/*
208208types/host.d.ts
209- vite.config.ts
209+ vite.config.mts
210210/tailwind.config.js
211211/postcss.config.js
212212/package.json
Original file line number Diff line number Diff line change 1717 "type" : " commonjs" ,
1818 "scripts" : {
1919 "postinstall" : " npm run build:electron && electron-builder install-app-deps" ,
20- "dev:web" : " vite --config web/vite.config.ts " ,
20+ "dev:web" : " vite --config web/vite.config.mts " ,
2121 "dev:electron" : " cross-env DEV_SERVER_URL=http://localhost:5173 electron ." ,
2222 "dev" : " concurrently -k \" npm:dev:web\" \" npm:dev:electron\" " ,
2323 "dev:electron:dist" : " cross-env DEV_SERVER_URL=file://local electron ." ,
2424 "dev:dist" : " npm run build:electron && npm run build:web && npm run dev:electron:dist" ,
2525 "build:electron" : " node scripts/clean-electron-dist.cjs && tsc -p tsconfig.electron.json" ,
26- "build:web" : " vite build --config web/vite.config.ts " ,
26+ "build:web" : " vite build --config web/vite.config.mts " ,
2727 "build" : " npm run build:electron && npm run build:web && electron-builder" ,
2828 "i18n:report" : " node scripts/i18n-check.js STRICT=0" ,
2929 "i18n:check" : " node scripts/i18n-check.js" ,
6666 "react-i18next" : " ^14.1.2" ,
6767 "tailwindcss" : " ^3.4.3" ,
6868 "typescript" : " ^5.4.5" ,
69- "vite" : " ^5.2.8 " ,
69+ "vite" : " ^5.4.21 " ,
7070 "vitest" : " ^2.0.5"
7171 },
7272 "overrides" : {},
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: Apache-2.0
2+ // Copyright (c) 2025 Lulu (GitHub: lulu-sk, https://github.com/lulu-sk)
13{
24 "extends" : " ../tsconfig.json" ,
35 "compilerOptions" : {
1113 "lib" : [" ES2020" , " DOM" ],
1214 "types" : []
1315 },
16+ "references" : [
17+ { "path" : " ./tsconfig.node.json" }
18+ ],
1419 "include" : [" src/**/*" ],
1520 "exclude" : [" dist" , " node_modules" ]
1621}
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: Apache-2.0
2+ // Copyright (c) 2025 Lulu (GitHub: lulu-sk, https://github.com/lulu-sk)
3+ {
4+ "extends" : " ../tsconfig.json" ,
5+ "compilerOptions" : {
6+ "composite" : true ,
7+ "module" : " NodeNext" ,
8+ "moduleResolution" : " NodeNext" ,
9+ "noEmit" : true ,
10+ "types" : [" node" , " vitest" ]
11+ },
12+ "include" : [" vite.config.mts" ]
13+ }
Original file line number Diff line number Diff line change 1- // SPDX-License-Identifier: Apache-2.0
2- // Copyright (c) 2025 Lulu (GitHub: lulu-sk, https://github.com/lulu-sk)
3-
4- import { defineConfig } from 'vite' ;
5- import react from '@vitejs/plugin-react' ;
6- import path from 'node:path' ;
7-
1+ // SPDX-License-Identifier: Apache-2.0
2+ // Copyright (c) 2025 Lulu (GitHub: lulu-sk, https://github.com/lulu-sk)
3+ /// <reference types="vitest" />
4+
5+ import * as path from "node:path" ;
6+ import { fileURLToPath } from "node:url" ;
7+ import react from "@vitejs/plugin-react" ;
8+ import { defineConfig } from "vitest/config" ;
9+
10+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
11+
812export default defineConfig ( {
913 root : path . resolve ( __dirname ) ,
1014 // 产物部署在 file:// 协议下,使用相对 base 确保资源路径指向当前目录
11- base : './' ,
15+ base : "./" ,
1216 plugins : [ react ( ) ] ,
1317 resolve : {
14- alias : {
15- '@' : path . resolve ( __dirname , ' src' )
16- }
17- } ,
18- build : {
19- outDir : ' dist' ,
20- emptyOutDir : true
21- } ,
18+ alias : {
19+ "@" : path . resolve ( __dirname , " src" )
20+ }
21+ } ,
22+ build : {
23+ outDir : " dist" ,
24+ emptyOutDir : true
25+ } ,
2226 server : {
2327 port : 5173 ,
2428 strictPort : true
2529 } ,
2630 test : {
27- environment : ' jsdom' ,
31+ environment : " jsdom" ,
2832 globals : true
2933 }
3034} ) ;
You can’t perform that action at this time.
0 commit comments