Vite 8.4.0 went stable on 26 November 2026, ten days after the first beta. We covered the beta’s security-focused additions (server.fs.strict: 'extended' and environment.addSafeModule) last week. This tutorial focuses on the rest of the stable release: the changes most teams will feel day to day, such as plugin names in error messages, worker chunks in the build manifest, retrying failed CSS preloads, subpath imports in CSS url(), WebAssembly source phase imports, and two config deprecations you should clean up now.

Upgrade

npm install -D vite@^8.4.0
# or
pnpm add -D vite@^8.4.0
npx vite --version

Starting a new project? [email protected] shipped the same day:

npm create vite@latest my-app

1. Errors now tell you which plugin broke

Anyone who has stared at a stack trace from deep inside a framework’s configureServer knows the pain. In 8.4, hooks that Vite calls itself attach plugin and hook properties to whatever they throw, and the message gets a [plugin-name] prefix (#24107, #24151). If an error already names a plugin, Vite leaves it alone, so the real culprit is preserved.

If you write plugins, you get this for free. If you log build errors in CI, you can now read the source directly:

// scripts/build.mjs
import { build } from 'vite'

try {
  await build()
} catch (err) {
  console.error(`Build failed in plugin "${err.plugin ?? 'unknown'}"` +
                ` during hook "${err.hook ?? 'n/a'}"`)
  console.error(err.message)
  process.exit(1)
}

A related fix (#24148) keeps plugin error messages exactly as thrown instead of rewriting them.

2. Worker chunks are listed in manifest.json

Backend integrations (Laravel, Rails, Django and friends) read .vite/manifest.json to know which files to serve. Until now, Web Worker chunks were missing, which made preloading or cache-busting workers awkward. 8.4 includes worker chunks in the manifest with isWorker / isWorkerEntry flags (#23699).

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

export default defineConfig({
  build: { manifest: true },
})
// src/main.js
const worker = new Worker(new URL('./heavy.worker.js', import.meta.url), {
  type: 'module',
})

After vite build, you can find the worker entry programmatically:

import manifest from './dist/.vite/manifest.json' with { type: 'json' }

const workers = Object.values(manifest).filter((c) => c.isWorkerEntry)
console.log(workers.map((c) => c.file))

Build environments also now expose the build manifest (#23292), which helps framework authors who need it inside the Environment API.

3. Retrying a failed lazy route now retries its CSS too

A common pattern for flaky networks or fresh deploys is to retry a failed dynamic import. Before 8.4, retrying the JavaScript import did not retry the CSS preload that failed with it, so the page loaded unstyled. Now a retried dynamic import also retries its CSS preload (#23710).

// a tiny retry helper for lazy routes/components
export async function importWithRetry(load, retries = 2) {
  for (let i = 0; ; i++) {
    try {
      return await load()
    } catch (err) {
      if (i >= retries) throw err
      await new Promise((r) => setTimeout(r, 500 * (i + 1)))
    }
  }
}

// usage (React example)
const Settings = lazy(() => importWithRetry(() => import('./pages/Settings.jsx')))

Pair this with Vite’s existing vite:preloadError window event if you want to reload the page after a deploy instead of retrying.

4. Subpath imports work inside CSS url()

Node’s subpath imports ("imports" in package.json, names that start with #) are a clean, standard alternative to custom aliases. In 8.4 they also resolve inside CSS url() (#23869).

// package.json
{
  "imports": {
    "#assets/*": "./src/assets/*"
  }
}
/* src/styles/hero.css */
.hero {
  background-image: url('#assets/hero-bg.webp');
}

The same #assets/... specifier already worked in JavaScript imports, so you can now drop a duplicate resolve.alias entry that existed only for CSS.

5. WebAssembly source phase imports

Following Vite’s WASM ESM integration work, 8.4 supports the TC39 source phase imports proposal for .wasm files (#22675). A source phase import gives you the compiled WebAssembly.Module without instantiating it, so you control instantiation:

import source mod from './math.wasm'

const instance = await WebAssembly.instantiate(mod, {
  './imports.js': { log: (x) => console.log(x) },
})
console.log(instance.exports.add(2, 3))

Dynamic import.source('./math.wasm') also resolves to the module. Because native support is not yet universal, Vite polyfills this by rewriting it to a ?source import, and in SSR it compiles the file via node:fs. Related: vite preview now serves compressed .wasm files (#24051).

6. Clean up two deprecations

css.devSourcemap → dev.sourcemap.css. 8.4 makes dev.sourcemap.css work and deprecates the old option (#23765):

// before
export default defineConfig({ css: { devSourcemap: true } })

// after (Vite 8.4+)
export default defineConfig({ dev: { sourcemap: { css: true } } })

--configLoader is stable; --configLoader=runner is deprecated (#23714). If your scripts use vite build --configLoader runner, switch to another loader before the option is removed:

{
  "scripts": {
    "build": "vite build --configLoader native"
  }
}

Test this change, since the native loader relies on your Node version being able to load the config file directly (for a TypeScript config, that means a Node release with type stripping).

Other notable changes

  • Bundled dev mode in SSR is supported (#21626).
  • Empty CSS files are no longer emitted (#24059).
  • vite now shows a running process for the same project when you start a second dev server (#23624).
  • optimizeDeps.rollupOptions was removed (#23760). Check old configs that still set it.
  • Build performance: import analysis hooks are skipped for unaffected chunks, and the terser plugin is skipped when terser is not used.

Upgrade checklist

  1. Bump vite to ^8.4.0 and run your build and tests.
  2. Replace css.devSourcemap with dev.sourcemap.css.
  3. Remove --configLoader=runner and any optimizeDeps.rollupOptions.
  4. If you parse manifest.json, make sure your code tolerates the new worker entries.
  5. Consider replacing CSS-only aliases with package.json subpath imports.
  6. If you adopted the beta’s server.fs.strict: 'extended', re-test it: a stable-release fix limits safe-module reference registration to that mode (#24206).

Takeaway

Vite 8.4 is a polish release with real ergonomics wins: errors that name the guilty plugin, manifests that finally include workers, CSS that survives import retries, and standards-based subpath imports everywhere. Upgrade, clear the two deprecations, and your next debugging session should be noticeably shorter.

Sources: Vite v8.4.0 release notes · Vite changelog · Vite config docs