Vite 8.4

Vite 8.4: New Features & How to Upgrade (2026)

Vite 8.4 is the newest minor release of the popular frontend build tool, and it landed on November 26, 2026. It is not a flashy release. Instead, it tightens dev server security, makes failed lazy loads recoverable, and adds a few long-requested features. In this guide, we cover what is new, which settings to try, and how to upgrade safely. All details come from the official Vite 8.4 announcement.

If you build React, Vue, Svelte or plain TypeScript apps, you almost certainly run Vite already. So this update reaches a lot of projects, even if you never touch the config.

What Is Vite 8.4?

Vite 8 shipped in March 2026 with Rolldown as its single Rust-based bundler. Since then, the team has released regular minor versions with new features and fixes. The new release continues that pattern. It keeps the same Node.js requirements as Vite 8, which are Node.js 20.19+ or 22.12+.

Because it is a minor release, it is designed to be a drop-in update. Most new behaviour is opt-in. However, a couple of changes affect the dev server and CLI by default, so it is worth reading the list below before you bump the version.

Vite 8.4 Key Features at a Glance

Here is a quick summary of the headline changes:

  • Allow-list based file serving through the new server.fs.strict: 'extended' option.
  • Refetching dynamic imports, so CSS for a lazy chunk loads again when a failed import is retried.
  • Subpath imports in CSS url(), for example url(#assets/logo.svg).
  • Duplicate CLI process detection, which stops you running two dev servers for one project.
  • Wasm source phase imports with import source.
  • Bundled dev mode for SSR, marked as highly experimental.

Stricter Dev Server Security in Vite 8.4

The biggest change is about the server.fs serve check. This check stops the dev server from handing out sensitive files if someone else can reach it on your network. Until now, it used a block-list. In other words, Vite and you had to list what must not be served.

The Vite team explains that block-lists keep needing patches, because attackers find new quirks in file systems and HTTP parsing. As a result, the new version adds an allow-list approach. With it, the dev server only serves files that your entry points actually reference, including transitive references.

How to Turn On the Allow-List

First, set strict to 'extended'. This also applies the check to modules that plugins load. Then, set allow to an empty array:

// vite.config.ts
import { defineConfig } from 'vite'

export default defineConfig({
  server: {
    fs: {
      strict: 'extended',
      allow: [],
    },
  },
})

Vite now registers referenced files through more routes than import, such as url() in CSS. Plugin authors who create modules that reference assets in other ways can call this.environment.addSafeModule. That way, users do not need to add those files to server.fs.allow by hand.

Importantly, the team says it intends to make this allow-list approach the default in the next major version. So testing it now on a branch is a smart move. It also matters if you ever expose your dev server with --host on a shared network.

Retrying Failed Dynamic Imports

Lazy-loaded routes and components use import(). Previously, if that network request failed once, the browser cached the failure. Even a second click would throw the same error. However, an update to the HTML specification in July 2026 now lets browsers retry failed module fetches.

According to the Vite team, Chrome 156+, Firefox 155+ and Safari Technology Preview 252 support this new behaviour. The new release builds on it. Its preload helper now fetches the CSS for a dynamic chunk again when the import runs again. Therefore, a retry can fully recover instead of loading a component with missing styles.

export const onClick = async () => {
  // With a supporting browser, a second click can succeed
  // even if the first fetch of this chunk failed
  const Success = await import('./Success.ts')
  render(Success)
}

This is a real win for users on flaky mobile networks. You do not need any config for it; simply upgrade and add a retry path in your UI.

Subpath Imports in CSS url()

Node.js subpath imports let you define private aliases in package.json that start with #. Vite has supported them in JavaScript for a while. CSS url() was the gap, because # also marks hash URLs.

Now Vite first tries to resolve the value as a subpath import. If that fails, it falls back to treating it as a normal hash URL. Here is a simple setup:

// package.json
{
  "imports": {
    "#assets/*": "./src/assets/*"
  }
}

/* styles.css */
.logo {
  background-image: url(#assets/logo.svg);
}

The Vite team now recommends subpath imports over resolve.alias or tsconfig paths. The reason is simple: Node.js and TypeScript both understand them natively.

Duplicate Dev Server Detection

Have you ever started npm run dev in a second terminal by mistake? The new version now spots this. If another dev process for the same project is running with similar options, Vite exits and tells you where the existing server lives, along with its process ID.

If you really do need two servers, pass --bypass-lock. This small change also helps AI coding agents, which often start servers again without checking. We covered a similar agent-friendly theme in our post on Chrome DevTools MCP.

Wasm Source Phase Imports

Vite now supports the source phase imports proposal for WebAssembly. With it, you get a compiled WebAssembly.Module and decide yourself how to instantiate it:

import source mod from './mod.wasm'

const instance = await WebAssembly.instantiate(mod, {
  './imports.js': { someFunc: () => {} },
})

TypeScript support for this syntax is coming in TypeScript 7.1, which is still in beta. You can read about that release in our TypeScript 7.1 Beta guide. Once 7.1 is stable, the Vite team plans to recommend this syntax over the Vite-specific .wasm?init import.

Experimental Bundled Dev Mode for SSR

Vite 8.1 introduced an experimental bundled dev mode for client code. This release extends it to server-side rendering. The team calls it “highly experimental” and describes it as the foundation for meta-frameworks. In short, it is not something to enable in production projects yet, but framework authors should keep an eye on it.

Other Notable Changes

The full changelog lists many smaller improvements. A few that stand out:

  • Plugin names now appear in hook errors, which makes plugin bugs easier to trace.
  • Worker chunks are now included in the build manifest.
  • Empty CSS files are no longer emitted.
  • --configLoader is now stable, and --configLoader=runner is deprecated.
  • The css.devSourcemap option moves to dev.sourcemap.css.
  • Build speed improves by skipping work, such as the terser plugin when terser is not used.

How to Upgrade to Vite 8.4

Upgrading to Vite 8.4 is quick for most projects. Follow these steps:

  • Check your Node.js version. You need 20.19+ or 22.12+. Our Node.js 26 LTS guide covers moving to a current LTS line.
  • Install the new version with your package manager.
  • Run your dev server and production build, then fix any warnings.
  • Move css.devSourcemap to dev.sourcemap.css if you use it.
  • Optionally, test server.fs.strict: 'extended' on a branch.
# npm
npm install -D vite@^8.4.0

# pnpm
pnpm add -D vite@^8.4.0

# confirm the version
npx vite --version

Meanwhile, if you use the wider VoidZero toolchain, see our Vite Plus 1.0 guide for how it fits alongside Vite.

Should You Upgrade Now?

For most teams, yes. This is a minor release with a strong security focus, and the default behaviour changes are small. The dynamic import fix alone improves resilience for real users. On the other hand, if you rely on scripts that start several dev servers for one project, test the new duplicate check first.

Frequently Asked Questions

When was Vite 8.4 released?

The Vite team announced Vite 8.4 on November 26, 2026.

Is this a breaking release?

No. It is a minor release. The new allow-list file check is opt-in for now, although the team plans to make it the default in the next major version.

Which browsers can retry failed dynamic imports?

The Vite team lists Chrome 156+, Firefox 155+ and Safari Technology Preview 252.

Do I need TypeScript 7.1 for Wasm source imports?

Vite itself handles the syntax. However, TypeScript type checking for import source arrives with TypeScript 7.1, which is currently in beta.

Conclusion

Vite 8.4 is a practical, security-minded release. The allow-list file check prepares projects for the next major version. Meanwhile, retryable dynamic imports, CSS subpath imports and duplicate process detection fix everyday pain points. Upgrade to Vite 8.4, run your builds, and try the stricter file serving on a branch today.

Sources

Need Help With Your Website or Web App?

Swrice builds and customises WordPress sites, plugins and web apps. Whether you need an upgrade, a custom feature or a fix, our team can handle it for you.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *