On November 26, 2026, the team released Vite 8.4. It looks like a routine minor update, yet inside sits a major shift in dev server security: Vite is moving away from file blocklists toward a strict allowlist. It also brings the bundler in line with modern browsers and TypeScript 7.1 by fixing retries for failed import() calls, enabling #subpath in CSS, and supporting standard WebAssembly imports.
Official release banner for Vite 8.4 (Source: vite.dev)
You can try it right in the browser at vite.new or locally via pnpm create vite. Let's walk through what each feature solves and where its current limits sit.
A server.fs Allowlist Instead of Endless Blocklist Patches
Vite's dev server serves project files on demand and supports implicit entry points. As long as it stays on localhost, you're fine. Once you run with --host on a shared network or forward a port to your phone, outside requests could reach .env or other sensitive files on disk.
Back in Vite 2.7, the team added checks under server.fs options. For years, those relied on a blocklist: Vite and developers listed paths that shouldn't be served, and everything else was allowed. The flaw in that defense is an endless cat-and-mouse game—any new filesystem quirk or HTTP parsing edge case reopened a hole and required another patch.
In Vite 8.4, amid rising attacks against local dev servers, an inverse model arrives: an allowlist. Everything is closed by default, and the server only serves files reachable from your entry point and its nested dependencies. Vite also automatically adds files referenced via CSS url() alongside regular JS imports.
You can opt into this strict model today with two options in vite.config.ts:
import { defineConfig } from 'vite'
export default defineConfig({
server: {
fs: {
// Enforce access checks on modules loaded by plugins too
strict: 'extended',
// Drop shared folders: allow only files in the import graph
allow: [],
},
},
})
Setting strict: 'extended' extends access checks to modules loaded by third-party plugins. Virtual modules prefixed with \0 (the Rollup and Vite convention) are excluded from checks, so standard ecosystem tooling keeps working.
The boundary is clear: in Vite 8.4, pairing strict: 'extended' with allow: [] is manual opt-in, and making it the default is planned for the next major release. If a plugin loads assets through a workaround instead of a standard import, strict mode will block that file. Plugin authors now have this.environment.addSafeModule to mark generated assets safe so users don't have to add paths to server.fs.allow. Test all your dev workflows before enabling the allowlist on an active project.
Retrying Dynamic Imports and Subpath Imports in CSS
Picture a common SPA moment. A user clicks a button that lazy-loads a component via import('./Success.ts'). Just then, their train enters a tunnel and the network drops. Seconds later, connection returns, they click again, and the component still won't open. Errors keep firing until they reload the whole tab.
That's how the HTML spec used to work: browsers permanently cached failed loads in their module map. In July 2026, WHATWG HTML updated the spec (PR #10327) so browsers stop poisoning the cache after network errors. In Vite, however, lazy JS chunks often pair with a separate CSS file. Vite 8.4 updates its internal preload helper so if a dynamic import fails and runs again, both the script and its CSS reload cleanly.
export const onClick = async () => {
// After a network drop, clicking again reloads both module and CSS
const SuccessComponent = await import('./Success.ts')
render(SuccessComponent)
}
You don't need to rewrite app code; it works automatically. The only limit is the user's browser version. Retries work where the spec update has shipped: Chrome 156+, Firefox 155+, and Safari Technology Preview 252. Older browsers still cache the failure until a page refresh.
The second handy fix targets subpath imports—Node.js and TypeScript's built-in way to define short internal paths via the "imports" field in package.json using #. They already worked fine in JS and TS, but Vite ignored them inside CSS url() because they clashed with hash URLs like SVG fragment links (#icon).
Now Vite tries resolving # paths inside url() as a subpath import first. If there's no match in package.json, it falls back to the original hash URL. First, define the prefix in your manifest:
{
"imports": {
"#assets/*": "./src/assets/*"
}
}
Then you can use #assets/... right inside stylesheets alongside local SVG mask or icon references with no conflict:
.hero-banner {
/* Resolves via the imports field in package.json */
background-image: url("#assets/hero-bg.webp");
}
.badge-icon {
/* Not in imports — stays a normal SVG hash URL */
clip-path: url("#badge-mask");
}
With this fix in place, the Vite team officially recommends subpath imports instead of duplicating resolve.alias in Vite config and paths in tsconfig.json. Define aliases once in package.json, and Vite, Node.js, and TypeScript all understand them.
Standard Wasm Source Phase Imports and TypeScript 7.1
Loading WebAssembly on the frontend long depended on bundler-specific tricks: in Vite, that meant the custom .wasm?init suffix. Release 8.4 adds support for the standard Wasm Source Phase Import syntax (import source).
It works cleanly: import source loads and compiles a .wasm file into a WebAssembly.Module without instantiating it. You decide when to start it and pass whatever imports you need to WebAssembly.instantiate:
// Load a compiled WebAssembly.Module without auto-starting it
import source mod from './mod.wasm'
// Instantiate explicitly with the required host functions
const instance = await WebAssembly.instantiate(mod, {
'./imports.js': {
someFunc: () => {},
},
})
This code isn't tied to any bundler suffix. Today's main limit is type-checker support: import source is understood by TypeScript 7.1, which is still in beta. Once TS 7.1 goes stable, Vite will recommend this syntax over .wasm?init; until then, stable projects can stick with the old suffix.
Duplicate Dev Server Guard and Early Bundled SSR
Anyone working with five terminal tabs or an AI agent knows this annoyance: you run vite while a server for the same project is already running elsewhere. Previously, the second process silently grabbed port 5174, ate memory, and left you wondering why edits weren't showing up on localhost:5173.
In Vite 8.4, the CLI catches duplicate processes. If you launch a second dev server for the same project with similar flags, it exits immediately and prints the URL and PID of the running instance:
Found another Vite dev process for this project
at http://localhost:5173/ (PID 12345).
Pass --bypass-lock to bypass this check.
If you genuinely need two dev servers running side by side (say, to debug two setups at once), you can override the check with a flag:
# Start a second dev server instance bypassing the lock check
vite --bypass-lock
The final notable addition is early support for bundled dev mode in Server-Side Rendering (SSR). Classic dev mode serves unbundled modules one by one, which slows down large apps. Bundled dev mode combines modules during development, and Vite is now laying the groundwork for SSR and future meta-framework integration. It's marked highly experimental—great for isolated testing, too early for production SSR pipelines.
What to Check After Upgrading to Vite 8.4
- Test strict allowlist mode (
server.fs.strict: 'extended'+server.fs.allow: []) locally to confirm plugins don't break asset loading. - Move duplicate
resolve.aliasandtsconfigpaths into#subpathimports inpackage.json, including CSSurl()paths. - Add
this.environment.addSafeModuleto any custom plugins generating non-standard assets before the next major release. - Plan migrating from
.wasm?inittoimport sourceonce TypeScript 7.1 reaches stable.


