https://github.com/pyk/cf-worker-secrets-test
Reproduce error Cloudflare Workers Secrets in webpack
https://github.com/pyk/cf-worker-secrets-test
Last synced: about 1 year ago
JSON representation
Reproduce error Cloudflare Workers Secrets in webpack
- Host: GitHub
- URL: https://github.com/pyk/cf-worker-secrets-test
- Owner: pyk
- Created: 2020-06-27T06:16:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-27T06:24:03.000Z (almost 6 years ago)
- Last Synced: 2025-02-07T17:24:15.812Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cannot use Workers Secrets in Webpack project
This repository contains code that I use to reproduce the error when using
Cloudflare Workers Secrets in webpack project.
Step by step to reproduce:
git clone https://github.com/pyk/cf-worker-secrets-test.git
cd with-webpack/
Rename the `wrangler.toml.example` to `wrangler.toml` and update `YOUR_ACCOUNT_ID` and `YOUR_ZONE_ID`.
Create the secret using the following command:
wrangler secret put MY_SECRET
Then publish the worker:
wrangler publish
Access `https://cf-worker-secrets-test-with-webpack.YOURNAME.workers.dev`.
You should see an error.
Where project [without webpack](./without-webpack) runs fine.