Change8

@cloudflare/vite-plugin@1.34.0

📦 cloudflare-workersView on GitHub →
3 features🐛 1 fixes🔧 1 symbols

Summary

This release introduces the ability to share local development and preview servers publicly using Cloudflare Quick Tunnels via a new `tunnel: true` option in the Vite plugin. Dependencies have also been updated.

Migration Steps

  1. To enable public sharing of the local dev server, set `tunnel: true` in your `cloudflare()` Vite plugin configuration.
  2. To enable tunnel sharing dynamically, set `tunnel` to check the environment variable, e.g., `tunnel: process.env.ENABLE_DEV_TUNNEL === "true"`.

✨ New Features

  • Added `tunnel: true` option to the `cloudflare()` Vite plugin to expose local dev and preview servers via Cloudflare Quick Tunnels.
  • Cloudflare Quick Tunnels provide a random `*.trycloudflare.com` URL for sharing local sessions and stop automatically when the session ends.
  • Quick tunnels do not require a Cloudflare account or configuration.

🐛 Bug Fixes

  • A warning is now shown when Server-Sent Events (SSE) responses are detected through the tunnel because quick tunnels do not support SSE.

Affected Symbols