Skip to content

[Bug]: should have idx error happens with deferSyncScanData + incremental rebuild #6569

@sapphi-red

Description

@sapphi-red

This modules.get_mut(state.idx()) panics with should have idx error.


This happens when editing the html file in full bundle mode. Vite sets moduleSideEffects for modules imported from HTML files via this.getModuleInfo or this.load.
The panic happens because:

  • only the HTML file is included in self.intermediate_normal_modules.modules
  • state.idx() is the idx of the imported modules

Reproduction test case: #6568

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions