Skip to content

Commit 3260211

Browse files
authored
Merge pull request #38 from LOG1997/feature-vite
打包为html,直接使用文件打开
2 parents 1b7f01f + ef3a379 commit 3260211

File tree

5 files changed

+1555
-279
lines changed

5 files changed

+1555
-279
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ or
136136
npm run preview
137137
```
138138

139+
若想直接以打开html文件的方式运行,请执行以下命令进行打包。打包完成后在dist目录中直接打开index.html即可。
140+
141+
```bash
142+
pnpm build:file
143+
or
144+
npm run build:file
145+
```
146+
139147
> 项目思路来源于 <https://github.com/moshang-xc/lottery>
140148
141149
## License

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"dev": "vite --host 0.0.0.0",
99
"build": "vue-tsc --noEmit && vite build",
1010
"build:pre": "vue-tsc --noEmit && vite build --mode prebuild",
11+
"build:file": "vue-tsc --noEmit && vite build --mode file",
1112
"test": "vitest",
1213
"test:ui": "vitest --ui",
1314
"preview": "vite preview",
@@ -47,6 +48,7 @@
4748
"@types/three": "^0.166.0",
4849
"@typescript-eslint/eslint-plugin": "^8.16.0",
4950
"@typescript-eslint/parser": "^8.16.0",
51+
"@vitejs/plugin-legacy": "^6.0.0",
5052
"@vitejs/plugin-vue": "^5.2.0",
5153
"@vitest/ui": "^2.1.5",
5254
"@vue/test-utils": "^2.4.6",

0 commit comments

Comments
 (0)