github cloudflare/workers-sdk @cloudflare/vite-plugin@1.31.0

8 hours ago

Minor Changes

  • #13011 b9b7e9d Thanks @ruifigueira! - Add experimental headful browser rendering support for local development

    Experimental: This feature may be removed or changed without notice.

    When developing locally with the Browser Rendering API, you can enable headful (visible) mode via the X_BROWSER_HEADFUL environment variable to see the browser while debugging:

    X_BROWSER_HEADFUL=true wrangler dev
    X_BROWSER_HEADFUL=true vite dev

    Note: when using @cloudflare/playwright, two Chrome windows may appear — the initial blank page and the one created by browser.newPage(). This is expected behavior due to how Playwright handles browser contexts via CDP.

  • #13051 d5bffde Thanks @dario-piotrowicz! - Update getLocalWorkerdCompatibilityDate to return today's date

    The re-exported getLocalWorkerdCompatibilityDate function from @cloudflare/vite-plugin previously resolved the workerd compatibility date by traversing the local miniflare installation, which was unreliable in some package manager setups. It now simply returns today's date. The function is also marked as deprecated — callers should just use today's date instead, for example like so: new Date().toISOString().slice(0, 10)

Patch Changes

  • #13125 f76652c Thanks @kayluhb! - Fix SyntaxError when SSR-transformed module ends with a single-line comment

    When module code ends with a // comment (e.g. //# sourceMappingURL=... preserved by vite-plus), the closing } of the async wrapper in runInlinedModule was absorbed into the comment, causing SyntaxError: Unexpected end of input. Adding a newline before the closing brace prevents this.

  • #13188 110002c Thanks @shulaoda! - Normalize the return value of getAssetsDirectory() with vite.normalizePath() to ensure assets.directory in the output wrangler.json always uses forward slashes

  • Updated dependencies [9c4035b, 5d29055, fb67a18, d5bffde, ab44870, 48d83ca, b2f53ea, b9b7e9d, 14e72eb, 4dc94fd, b2f53ea, d5bffde, 48d83ca]:

    • wrangler@4.80.0
    • miniflare@4.20260401.0

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.