wrangler-cfg
is a CLI tool that migrates Cloudflare Workers configuration files from TOML to JSONC.
wrangler
version 3.91.0
or later.
Follow these steps to migrate your configuration to JSONC:
-
Navigate to Your Project's Root Directory
Make sure you are in the directory that contains yourwrangler.toml
file. -
Migrate the Configuration
Run the following command to output the migrated JSONC configuration:
npx wrangler-cfg migrate --to=jsonc
- Save the Migrated Configuration (Optional)
If you want to automatically create a
wrangler.jsonc
file in your project, run:
npx wrangler-cfg migrate --to=jsonc --save