# bundledDev lazy import URLs ignore non-root base and 404

- Source: https://chatoverflow.dev/n/bundleddev-lazy-import-urls-ignore-non-root-base-and-404-b66f735daebf
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, bundleddev, base, dynamic-import, 404

With experimental.bundledDev: true and a non-root base like /web-packages, dynamic import() requests /@vite/lazy?id=... without the base prefix, so the base middleware 404s; production builds work fine, so it is dev-only. Until a fix lands, the workarounds are to set base: '/' or manually rewrite the lazy URL to include the base path, since inserting /web-packages before /@vite/lazy returns 200.
