yjl9903 / vite-plugin-cloudflare-functions

Make Cloudflare Pages Functions works with Vite friendly
https://vite-plugin-cloudflare-functions.pages.dev/
MIT License
55 stars 7 forks source link

wrangler 3.72.1 deprecated --proxy and [proxy command] #735

Closed lijicheng168 closed 2 months ago

lijicheng168 commented 2 months ago

Clear and concise description of the problem

The wrangler 3.72.1 deprecated --proxy and [proxy command] Does the plugin still work fine?

Suggested solution

No response

Additional context

wrangler pages dev -h wrangler pages dev [directory] [-- command..]

Develop your full-stack Pages application locally

POSITIONALS directory The directory of static assets to serve [string]

command The proxy command to run [deprecated] [string]

GLOBAL FLAGS -h, --help Show help [boolean] -v, --version Show version number [boolean]

OPTIONS --compatibility-date Date to use for compatibility checks [string] --compatibility-flags, --compatibility-flag Flags to use for compatibility checks [array] --ip The IP address to listen on [string] --port The port to listen on (serve from) [number] --inspector-port Port for devtools to connect to [number]

--proxy The port to proxy (where the static assets are served) [deprecated] [number]

--script-path The location of the single Worker script if not using functions [default: _worker.js] [deprecated] [string] --no-bundle Whether to run bundling on _worker.js [boolean] [default: false] -b, --binding Bind variable/secret (KEY=VALUE) [array] -k, --kv KV namespace to bind (--kv KV_BINDING) [array] --d1 D1 database to bind (--d1 D1_BINDING) [array] -o, --do Durable Object to bind (--do DO_BINDING=CLASS_NAME@SCRIPT_NAME) [array] --r2 R2 bucket to bind (--r2 R2_BINDING) [array] --ai AI to bind (--ai AI_BINDING) [string] --version-metadata Worker Version metadata (--version-metadata VERSION_METADATA_BINDING) [string] --service Service to bind (--service SERVICE=SCRIPT_NAME) [array] --live-reload Auto reload HTML pages when change is detected [boolean] [default: false] --local-protocol Protocol to listen to requests on, defaults to http. [choices: "http", "https"] --https-key-path Path to a custom certificate key [string] --https-cert-path Path to a custom certificate [string] --persist-to Specify directory to use for local persistence (defaults to .wrangler/state) [string] --log-level Specify logging level [choices: "debug", "info", "log", "warn", "error", "none"] --show-interactive-dev-session Show interactive dev session (defaults to true if the terminal supports interactivity) [boolean] --experimental-dev-env, --x-dev-env Use the experimental DevEnv instantiation (unified across wrangler dev and unstable_dev) [boolean] [default: false] --experimental-registry, --x-registry Use the experimental file based dev registry for multi-worker development [boolean] [default: false]

lijicheng168 commented 2 months ago

Just use https://github.com/cloudflare/workers-sdk/issues/5315#issuecomment-2095319081 getplatformproxy Maybe can solve the probem. Should we do this or vite do this?

lijicheng168 commented 2 months ago

I got this! https://github.com/TorchAuth/vite-plugin-wrangler-spa