News

Vite 8.4: a stricter dev server and Wasm source imports. Programming news, Nov 26

Vite 8.4 adds an allow-list for dev server files, retries failed dynamic imports and supports Wasm source imports. What it changes for front-end learners.

CodeWorlds Editorial
Vite 8.4: a stricter dev server and Wasm source imports. Programming news, Nov 26
  • Vite
  • TypeScript 7
In this article5

The Vite team released version 8.4 on November 26. The headline change is about security: the dev server can now serve only the files your app actually references, instead of guarding a list of forbidden ones. The release also retries failed dynamic imports, adds a new way to import Wasm files and stops you from running two dev servers for the same project.

What is new in Vite 8.4

An allow-list instead of a block-list

Since version 2.7, Vite has had the server.fs check, which keeps the dev server from handing out files outside your project if someone from outside can reach it. Until now it worked as a block-list: Vite and the developer had to name the sensitive files. According to the release announcement, the team kept patching bypasses built on quirks of file systems and HTTP parsing, and the number of attacks is going up. This matters most when you start the server with --host to check the page on your phone: anyone on the same network, say in a cafΓ© or a dorm, can then connect to it.

Vite 8.4 adds server.fs.strict: 'extended'. It also checks modules loaded by plugins, and it treats more than import as a reference, for example url() in CSS. Combine it with server.fs.allow: [] and you get a real allow-list: the server only returns files reachable through a chain of references from the entry point. For now you opt in, but the team plans to make it the default in the next major version. Plugins that generate modules pointing at files without an import can register them with this.environment.addSafeModule.

A second click can fix a failed import

The HTML specification changed in July so that browsers may retry fetching a module after a failed dynamic import. Chrome 156+, Firefox 155+ and Safari Technology Preview 252 support it. Vite 8.4 updates its preload helper so that when import() runs again, the CSS for that chunk is fetched again too. In practice, if a component failed to load for someone on a bad connection, clicking a second time can work instead of throwing the same error.

Smaller changes worth knowing

  • Subpath imports in CSS. Paths like #assets/logo.png now work inside url(). The team recommends them over resolve.alias and tsconfig paths, because Node.js and TypeScript understand them as well.
  • One dev server per project. Start a second dev server for the same project and Vite exits with a message telling you the address and PID of the first one. The --bypass-lock flag skips the check.
  • Wasm source phase imports. import source mod from './mod.wasm' gives you a WebAssembly.Module. TypeScript 7.1, currently in beta, will support the syntax; once it is stable, Vite will recommend it over its own .wasm?init.
  • Bundled dev mode for SSR. The team itself calls it highly experimental. It lays the groundwork for meta-frameworks.

The full list is in the v8.4.0 release notes on GitHub. In my view it is worth a look for one small fix alone: errors thrown in plugin hooks now include the plugin name, which saves time when a build fails for no obvious reason.

What this means if you are learning to code

If you create projects with npm create vite@latest, new ones already get 8.4 and there is nothing to do. Most changes work in the background, and the strictest protection has to be switched on deliberately. If you have an older project from a course or a tutorial, updating takes one command (see the questions below).

Watch out for one thing right away: the duplicate process message. Beginners often leave npm run dev running in one terminal and start it again in another. Until now Vite simply started a second server on another port; now it tells you plainly that the project is already running. Close the old process rather than reaching for --bypass-lock.

The second thing is subpath imports. If you are still figuring out how imports and modules work, start with the JavaScript docs, then read the Vite collection. An import like #something from the imports field in package.json is a Node.js standard, so you will use it outside Vite too.

Vite sits underneath Vue, React and Svelte projects, so you can practise in the Vue.js course, which has Vite in its syllabus, and in the JavaScript and TypeScript course. Wasm imports and the SSR mode can safely wait. They are tools for library and framework authors, not something you need for your first apps.

Also today

  • NestJS 12.6.3 improves instrumented tests. Test.createTestingModule() now accepts the instrument option, just like NestFactory.create(). On Express, route conflict detection now ignores case, so GET /users and GET /Users with duplicate: 'error' will stop the app from starting. Source
  • Node.js 27.0.0-alpha.0.2.0 marks sqlite as stable. The latest Node 27 alpha marks the built-in node:sqlite module as stable and adds a statement.columnCount getter. The docs now deprecate util.TextDecoder and util.TextEncoder. Source
  • Next.js 16.5 reaches preview. Vercel tagged v16.5.0-preview.0, the first preview of the 16.5 line. There are no release notes yet, so for now the changes are spread across the canary releases. Source
  • The Ladybird browser is in alpha. Since November 23 you can download Ladybird, a browser with its own engine written from scratch, on macOS and Linux without compiling it. It supports WebDriver and the Firefox DevTools protocol, and the authors ask web developers to report what breaks. Source
  • llama.cpp benchmarks on AMD hardware. A new dashboard on Hugging Face tracks llama.cpp on the Radeon 8060S and Radeon AI Pro R9700S. It shows prompt processing (PP512) and generation (TG128) in tokens per second across builds and quantizations. Source
  • Google Play wants a trader status declaration by February 1, 2027. Every developer account must say whether it acts as a trader under EU and UK law. From March 1, 2027, apps from a personal account that declared trader status will show the developer's phone number and address. Source

Frequently asked questions

How do I update a project to Vite 8.4?

Run npm install -D vite@latest in the project, then check that npm run dev and npm run build behave as before. This is a minor release and the stricter file protection is off by default, so most projects need no config changes.

What is server.fs.strict: 'extended'?

It is a new, stricter mode for deciding which files the dev server may serve. It also covers modules from plugins and files referenced by url() in CSS, and together with server.fs.allow: [] it only lets through files your app references.

Do I need to change anything if I use path aliases?

No, resolve.alias and tsconfig paths keep working. For new projects, though, Vite recommends subpath imports, because Node.js and TypeScript understand them without extra setup.

Sources


This article was prepared with the help of AI from primary sources and reviewed by the CodeWorlds editorial team.