Packages

@cloudflare/vite-plugin

1.70.1 · 19 Nov 2026MIT12.3M / weekRepositoryHomepagenpmAtom feed

Your version

1.31.0

2 Apr 2026Where it was published

1.70.1 is the newest release of 1.x.

In short

2 new2 fixed2 internal

Release note

Minor Changes

  • 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.

  • 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

  • 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.

  • Normalize the return value of getAssetsDirectory() with vite.normalizePath() to ensure assets.directory in the output wrangler.json always uses forward slashes

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.