[GH-ISSUE #33] feature-request: deploy --env option #15

Closed
opened 2026-05-06 12:36:30 +02:00 by BreizhHardware · 0 comments

Originally created by @thiskevinwang on GitHub (Feb 25, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/33

Request

As a user with env.production.* defined in wrangler.jsonc, I want to be able to use it w/ vinext deploy

As of vinext v0.0.1, there doesn't seem to be an option for this:

me@~: $ bunx vinext deploy -h                           

  vinext deploy - Deploy to Cloudflare Workers

  Usage: vinext deploy [options]

  One-command deployment to Cloudflare Workers. Automatically:
    - Detects App Router or Pages Router
    - Generates wrangler.jsonc, worker/index.ts, vite.config.ts if missing
    - Installs @cloudflare/vite-plugin and wrangler if needed
    - Builds the project with Vite
    - Deploys via wrangler

  Options:
    --preview                Deploy to a preview environment
    --name <name>            Custom Worker name (default: from package.json)
    --skip-build             Skip the build step (use existing dist/)
    --dry-run                Generate config files without building or deploying
    -h, --help               Show this help

  Experimental:
    --experimental-tpr               Enable Traffic-aware Pre-Rendering
    --tpr-coverage <pct>             Traffic coverage target, 0–100 (default: 90)
    --tpr-limit <count>              Hard cap on pages to pre-render (default: 1000)
    --tpr-window <hours>             Analytics lookback window in hours (default: 24)

  TPR (Traffic-aware Pre-Rendering) uses Cloudflare zone analytics to determine
  which pages get the most traffic and pre-renders them into KV cache during
  deploy. This feature is experimental and must be explicitly enabled. Requires
  a custom domain (zone analytics are unavailable on *.workers.dev) and the
  CLOUDFLARE_API_TOKEN environment variable with Zone.Analytics read permission.

  Examples:
    vinext deploy                              Build and deploy to production
    vinext deploy --preview                    Deploy to a preview URL
    vinext deploy --dry-run                    See what files would be generated
    vinext deploy --name my-app                Deploy with a custom Worker name
    vinext deploy --experimental-tpr           Enable TPR during deploy
    vinext deploy --experimental-tpr --tpr-coverage 95   Cover 95% of traffic
    vinext deploy --experimental-tpr --tpr-limit 500     Cap at 500 pages
Originally created by @thiskevinwang on GitHub (Feb 25, 2026). Original GitHub issue: https://github.com/cloudflare/vinext/issues/33 ## Request As a user with `env.production.*` defined in `wrangler.jsonc`, I want to be able to use it w/ `vinext deploy` As of `vinext v0.0.1`, there doesn't seem to be an option for this: ```console me@~: $ bunx vinext deploy -h vinext deploy - Deploy to Cloudflare Workers Usage: vinext deploy [options] One-command deployment to Cloudflare Workers. Automatically: - Detects App Router or Pages Router - Generates wrangler.jsonc, worker/index.ts, vite.config.ts if missing - Installs @cloudflare/vite-plugin and wrangler if needed - Builds the project with Vite - Deploys via wrangler Options: --preview Deploy to a preview environment --name <name> Custom Worker name (default: from package.json) --skip-build Skip the build step (use existing dist/) --dry-run Generate config files without building or deploying -h, --help Show this help Experimental: --experimental-tpr Enable Traffic-aware Pre-Rendering --tpr-coverage <pct> Traffic coverage target, 0–100 (default: 90) --tpr-limit <count> Hard cap on pages to pre-render (default: 1000) --tpr-window <hours> Analytics lookback window in hours (default: 24) TPR (Traffic-aware Pre-Rendering) uses Cloudflare zone analytics to determine which pages get the most traffic and pre-renders them into KV cache during deploy. This feature is experimental and must be explicitly enabled. Requires a custom domain (zone analytics are unavailable on *.workers.dev) and the CLOUDFLARE_API_TOKEN environment variable with Zone.Analytics read permission. Examples: vinext deploy Build and deploy to production vinext deploy --preview Deploy to a preview URL vinext deploy --dry-run See what files would be generated vinext deploy --name my-app Deploy with a custom Worker name vinext deploy --experimental-tpr Enable TPR during deploy vinext deploy --experimental-tpr --tpr-coverage 95 Cover 95% of traffic vinext deploy --experimental-tpr --tpr-limit 500 Cap at 500 pages ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#15
No description provided.