You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Static asset imports, such as background: url('./somebg.jpg') in css, fail to load the first time a page is opened when bundledDev: true is enabled. After a page refresh, they load correctly.
2026-06-03.18.51.20.mov
They load correctly on the first page load if I disable bundledDev.
I’m not sure whether it’s related, but there was a similar issue involving React lazy loading and bundledDev: #22454
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
Static asset imports, such as
background: url('./somebg.jpg')in css, fail to load the first time a page is opened whenbundledDev: trueis enabled. After a page refresh, they load correctly.2026-06-03.18.51.20.mov
They load correctly on the first page load if I disable
bundledDev.I’m not sure whether it’s related, but there was a similar issue involving React lazy loading and
bundledDev: #22454Reproduction
https://github.com/baevm/vite-rolldown-lazy-import-repro/tree/assets-load-reproduction (branch
assets-load-reproduction)Steps to reproduce
System Info
System: OS: macOS 15.6.1 CPU: (12) arm64 Apple M4 Pro Memory: 1.22 GB / 24.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.14.0 - /Users/baevm/.nvm/versions/node/v24.14.0/bin/node npm: 11.9.0 - /Users/baevm/.nvm/versions/node/v24.14.0/bin/npm pnpm: 11.1.3 - /opt/homebrew/bin/pnpm bun: 1.2.22 - /opt/homebrew/bin/bun Deno: 2.4.5 - /opt/homebrew/bin/deno Browsers: Chrome: 148.0.7778.216 Safari: 18.6 npmPackages: @vitejs/plugin-react: ^6.0.2 => 6.0.2 vite: 8.0.16 => 8.0.16Used Package Manager
npm
Logs
No response
Validations