
- 在 package.json 中添加 @cloudflare/vite-plugin 依赖 - 新增 server/index.ts 文件实现 Cloudflare Workers 逻辑 - 更新 vite.config.ts 配置,添加 cloudflare 插件 - 新增 tsconfig.worker.json 配置 TypeScript 编译选项 - 更新 App.vue,添加从 API 获取名称的功能
64 lines
2.0 KiB
JSON
64 lines
2.0 KiB
JSON
{
|
|
"packageManager": "pnpm@10.15.1",
|
|
"name": "vue-ts-example-2025",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": "^20.19.0 || >=22.12.0"
|
|
},
|
|
"scripts": {
|
|
"dev": "vite --port 4730 --host --strictPort",
|
|
"build": "run-p type-check \"build-only {@}\" --",
|
|
"preview": "vite preview",
|
|
"test:unit": "vitest",
|
|
"test:e2e": "playwright test",
|
|
"build-only": "vite build",
|
|
"type-check": "vue-tsc --build",
|
|
"lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
|
|
"lint:eslint": "eslint . --fix",
|
|
"lint": "run-s lint:*",
|
|
"format": "prettier --write src/",
|
|
"wrangler:deploy:preview": "wrangler pages deploy dist --project-name=vue-ts-example-2025 --branch=preview",
|
|
"wrangler:deploy:prod": "wrangler pages deploy dist --project-name=vue-ts-example-2025",
|
|
"deploy:preview": "run-s build-only wrangler:deploy:preview",
|
|
"deploy:prod": "run-s build-only wrangler:deploy:prod",
|
|
"cf-typegen": "wrangler types"
|
|
},
|
|
"dependencies": {
|
|
"pinia": "^3.0.3",
|
|
"vue": "^3.5.18",
|
|
"vue-router": "^4.5.1"
|
|
},
|
|
"devDependencies": {
|
|
"@cloudflare/vite-plugin": "^1.12.3",
|
|
"@playwright/test": "^1.54.1",
|
|
"@prettier/plugin-oxc": "^0.0.4",
|
|
"@tsconfig/node22": "^22.0.2",
|
|
"@types/jsdom": "^21.1.7",
|
|
"@types/node": "^22.16.5",
|
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
"@vitejs/plugin-vue-jsx": "^5.0.1",
|
|
"@vitest/eslint-plugin": "^1.3.4",
|
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
"@vue/test-utils": "^2.4.6",
|
|
"@vue/tsconfig": "^0.7.0",
|
|
"eslint": "^9.31.0",
|
|
"eslint-plugin-oxlint": "~1.8.0",
|
|
"eslint-plugin-playwright": "^2.2.0",
|
|
"eslint-plugin-vue": "~10.3.0",
|
|
"jiti": "^2.4.2",
|
|
"jsdom": "^26.1.0",
|
|
"npm-run-all2": "^8.0.4",
|
|
"oxlint": "~1.8.0",
|
|
"prettier": "3.6.2",
|
|
"typescript": "~5.8.0",
|
|
"vite": "npm:rolldown-vite@latest",
|
|
"vite-plugin-vue-devtools": "^8.0.0",
|
|
"vitest": "^3.2.4",
|
|
"vue-tsc": "^3.0.4",
|
|
"wrangler": "^4.34.0"
|
|
}
|
|
}
|