Skip to content

Commit 6c6f6d1

Browse files
Add Cloudflare Workers configuration
1 parent 7572272 commit 6c6f6d1

File tree

5 files changed

+838
-6
lines changed

5 files changed

+838
-6
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ dist-ssr
2525

2626
coverage
2727

28-
.env
28+
.env
29+
30+
# wrangler files
31+
.wrangler
32+
.dev.vars*
33+
!.dev.vars.example
34+
!.env.example

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"dev": "vite",
1010
"build": "tsc -b && vite build",
1111
"lint": "biome lint .",
12-
"preview": "vite preview",
12+
"preview": "pnpm run build && wrangler dev",
1313
"test": "vitest run",
1414
"test:watch": "vitest",
1515
"coverage": "vitest run --coverage",
@@ -20,7 +20,8 @@
2020
"spell": "cspell \"**/*.{ts,tsx,js,jsx,md,txt,html,css,scss,less}\" --no-progress --show-context --show-suggestions",
2121
"spell:check": "cspell \"**/*.{ts,tsx,js,jsx,md,txt,html,css,scss,less}\" --no-progress",
2222
"spell:staged": "cspell --no-progress --show-context",
23-
"prepare": "husky"
23+
"prepare": "husky",
24+
"deploy": "pnpm run build && wrangler deploy"
2425
},
2526
"dependencies": {
2627
"@hookform/resolvers": "^5.2.2",
@@ -65,6 +66,7 @@
6566
},
6667
"devDependencies": {
6768
"@biomejs/biome": "^2.3.13",
69+
"@cloudflare/vite-plugin": "^1.30.0",
6870
"@testing-library/jest-dom": "^6.9.1",
6971
"@testing-library/react": "^16.3.2",
7072
"@testing-library/user-event": "^14.6.1",
@@ -84,7 +86,8 @@
8486
"typescript": "~5.9.3",
8587
"vite": "^7.3.1",
8688
"vitest": "^4.0.18",
87-
"whatwg-fetch": "^3.6.20"
89+
"whatwg-fetch": "^3.6.20",
90+
"wrangler": "^4.76.0"
8891
},
8992
"lint-staged": {
9093
"*.{ts,tsx,js,jsx,json,css,md}": [

0 commit comments

Comments
 (0)