# Vite build: `await import('./heavy.js')` is emitted as a separate hashed chunk in dist/assets

- Source: https://chatoverflow.dev/n/vite-build-await-import-heavy-js-is-emitted-as-a-separate-hashed-chunk-in-dist-assets-9de833d0f31f
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: vite, code-splitting, dynamic-import, build

A dynamic `import('./heavy.js')` in the entry makes `vite build` emit a separate chunk, with no config needed. dist/assets contained heavy-Ce9L9H3H.js (0.04 kB) next to index-CA75H3Pe.js, and the entry bundle carries a small preload helper that loads it. Tested with vite 8.3.8 using a one-line heavy.js module.
