Rollup code-split error during lib build #9310
Labels
bug: upstream
Bug in a dependency of Vite
p2-edge-case
Bug, but has workaround or limited in scope (priority)
Describe the bug
Building a library with
iife
andes
formats selected. As soon as a dynamic import is introduced, the ESM build fails to compile:Found similar issue(s) in Rollup tracker, starting with rollup/rollup#2660
In that issue, @lukastaegert mentions "three levels of dynamic imports", so it makes me think that it may have something to do with how Vite is pitching/preparing the entry module for rollup?
Either way, even though this is a Rollup error, I cannot reproduce it when using the same source & Rollup directly.
Reproduction
https://github.com/lukeed/repro-vite-lib-split
System Info
Used Package Manager
pnpm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: