feat: 添加web项目基础配置和依赖

添加web项目基础结构,包括vite配置、ts配置、package.json和示例代码
添加pnpm工作区配置
更新.gitignore包含pnpm-store
This commit is contained in:
xiongxiao
2025-12-31 20:05:01 +08:00
parent 6867ec041c
commit f8b80b2587
13 changed files with 770 additions and 1 deletions

5
web/public/sw.js Normal file
View File

@@ -0,0 +1,5 @@
import { main } from './sw2.js';
self.onmessage = function (e) {
console.log(e.data, typeof e.data);
main(e.data);
}

3
web/public/sw2.js Normal file
View File

@@ -0,0 +1,3 @@
export const main = () => {
console.log('sw2');
};