fix(build): use correct base for chunk import map - #23365
Conversation
|
Here is a detailed explanation of what was done in this PR: The ProblemWhen \�uild.chunkImportMap\ is enabled and \�ase\ is not /, the module preload dependency lists get dropped (__vite__mapDeps\ is absent). This happens because Vite injected one \�aseUrl\ into The FixIn \packages/vite/src/node/plugins/html.ts, the function \getImportMapBaseUrl\ was updated to read from \options.base\ instead of falling back blindly to /. \\ s By changing this one line, __vite__mapDeps\ is preserved properly, the CSS gets requested, and the mapped key reverts to using the stable ID as expected. |
|
This PR has been automatically flagged as likely to be created by a bot, LLM, or agent, and will be automatically closed. These contributions harm the maintenance of the project. Please read our AI policy for more information. If you believe this is a mistake, please reply to this comment and we will review it. |
Fixes #23350. The issue drops module preload dependency lists when base is not /. This changes \getImportMapBaseUrl\ to return \options.base\ instead of /\ when \chunkImportMap.baseUrl\ is missing.