Skip to content

Commit f8d657c

Browse files
Update Wrangler, Cloudflare Vite plugin, and add dotenv documentation (#3)
Co-authored-by: Cursor Agent <[email protected]>
1 parent 3fdad0d commit f8d657c

File tree

6 files changed

+69
-57
lines changed

6 files changed

+69
-57
lines changed

epicshop/epic-me/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ npm run dev
3333

3434
Your application will be available at `http://localhost:5173`.
3535

36+
> Note: Wrangler and the Cloudflare Vite plugin now support dotenv files for local development.
37+
> Create a `.env` in this app's root (alongside `wrangler.jsonc`) to define local `vars`.
38+
> For example:
39+
>
40+
> ```dotenv
41+
> TITLE="My Worker"
42+
> API_TOKEN="dev-token"
43+
> ```
44+
>
45+
> These will be available on `context.cloudflare.env.TITLE` / `env.API_TOKEN` in worker code during `wrangler dev`.
46+
> You can also add `.env.<environment>` files (e.g. `.env.staging`) and run `wrangler dev --env staging`.
47+
3648
## Previewing the Production Build
3749
3850
Preview the production build locally:

epicshop/epic-me/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

epicshop/epic-me/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"react-router": "^7.7.1"
2929
},
3030
"devDependencies": {
31-
"@cloudflare/vite-plugin": "^1.11.0",
31+
"@cloudflare/vite-plugin": "^1.11.2",
3232
"@epic-web/config": "^1.21.3",
3333
"@react-router/dev": "^7.7.1",
3434
"@tailwindcss/vite": "^4.1.11",
@@ -43,7 +43,7 @@
4343
"vite": "^7.0.6",
4444
"vite-plugin-devtools-json": "^0.4.1",
4545
"vite-tsconfig-paths": "^5.1.4",
46-
"wrangler": "^4.27.0"
46+
"wrangler": "^4.28.1"
4747
},
4848
"prettier": "@epic-web/config/prettier"
4949
}

exercises/02.start/01.solution/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"prettier": "^3.6.2",
3030
"typescript": "^5.9.2",
3131
"vitest": "^3.2.4",
32-
"wrangler": "^4.26.0"
32+
"wrangler": "^4.28.1"
3333
},
3434
"prettier": "@epic-web/config/prettier",
3535
"license": "GPL-3.0-only"

exercises/99.finished/99.solution/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"prettier": "^3.6.2",
3030
"typescript": "^5.9.2",
3131
"vitest": "^3.2.4",
32-
"wrangler": "^4.26.0"
32+
"wrangler": "^4.28.1"
3333
},
3434
"prettier": "@epic-web/config/prettier",
3535
"license": "GPL-3.0-only"

package-lock.json

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)