Changelog

vitejs/vite · · 9 commits

Bundled dev fixes and base matching

Vite tightens bundled dev asset URL handling, fixes lockfile hashing, and corrects base-path stripping for partial matches.

Bundled dev now respects server.origin for emitted asset URLs (h-a-n-a52ba877)

Asset URLs produced in dev and bundled dev now get prefixed with server.origin, which fixes broken links for files outside the project root and public/CSS asset references. This closes a class of incorrect URL generation in bundled dev that could break backend-integrated setups.

Lockfile hashing now falls back to yarn.lock (aotradovecf206096)

The dep optimizer now hashes yarn.lock when no lockfile is found under node_modules, instead of missing the project's actual lockfile. That makes dependency re-optimization track Yarn projects more reliably, especially when their state files are absent or managed differently.

Base middleware no longer strips partial path matches (btea3dfde87)

Requests now only have the base removed when the pathname matches the base exactly or starts with it as a full segment. This fixes edge cases like /foobar being mistaken for /foo, preventing incorrect rewrites and improving 404 behavior for apps using a base without a trailing slash.

Other misc changes

  • Bundled-dev output normalization fix for served files (h-a-n-adf4e02c)
  • CI/playground test updates for bundled-dev skips across CSS, CSP, assets, and backend integration (h-a-n-a3b72997, h-a-n-aa4bfdb1, h-a-n-a849c253, h-a-n-a7a89794)
  • Minor bundled-dev build ignore tweak for chunk import maps (h-a-n-acfe917d)