-
Notifications
You must be signed in to change notification settings - Fork 738
[Bug]: Dynamic common chunk imports entry module #8849
Description
Reproduction link or steps
What is expected?
When executing the index entry file, the admin entry file should not be executed. Here is a repl link to how rollup correctly bundles the same code (4 chunks).
What is actually happening?
In this scenario, two entry files (index and admin) dynamically import a common module. The admin entry file also statically imports some downstream dependency. The bundler puts the statically imported downstream dependency into the admin entry file (see Chunk Graph in repl, or the output of the common module which includes an import from the admin chunk).
As a result, there is a dependency from the common module to the admin entry file. When executing the index entry file, the admin entry file is also executed.
System Info
System:
OS: Windows 11 10.0.26200
CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13600KF
Memory: 42.69 GB / 63.84 GB
Browsers:
Chrome: 146.0.7680.80Any additional comments?
I ran into this while upgrading to vite 8 and wondering why admin functionality was loaded from the user bundle.
Metadata
Metadata
Assignees
Type
Fields
Give feedbackPriority
Effort