Vite 8.4 adds opt-in allow-list file serving for the dev server and retries failed dynamic imports
The Vite team released Vite 8.4 on November 26. The headline change is a stricter, opt-in allow-list check for files the dev server may serve, meant to stop bypasses of the older block-list approach. The release also improves how failed dynamic imports are retried.
Why it matters
Vite's server.fs check exists to stop a dev server that is reachable by an attacker from leaking sensitive files. Until now it relied on a block-list, and the team says it kept having to patch bypasses that abused file system and HTTP parsing quirks as attacks increased. Setting server.fs.strict to 'extended' together with server.fs.allow as an empty list now limits serving to files referenced from the entrypoint, including transitive references. Vite plans to make this the default in the next major version.
Plugin authors whose generated modules reference assets without an import can call this.environment.addSafeModule so users do not have to extend the allow list by hand.
The second change follows a July update to the HTML specification that lets browsers retry failed module fetches for dynamic imports. With Vite 8.4, the preload helper also re-fetches the CSS of a dynamic chunk when the import runs again. Teams that expose dev servers on shared networks should test the extended mode now.