2ffcc59ea7
This diff: * introduces the `VersionedContentMerger` trait, which allows for merging the updates of versioned contents within the same chunk group; * implements this for `EcmascriptChunkContent`/`EcmascriptChunkUpdate`, turning them into `EcmascriptMergedChunkContent`/`EcmascriptMergedChunkUpdate`; * creates a new `ChunkList` asset which is capable of merging chunk updates of chunks within the same chunk group, and create such an asset for dynamic chunks (through manifest/loader_item.rs) and chunk group files assets. This fixes a bunch of edge cases related to HMR: * HMR of dynamic imports now works; * Chunks getting added/deleted/renamed now also works with HMR, since we're listening to updates at the chunk group level; * CSS chunks get reloaded in the right order, with respect for precedence. There are still known edge cases with HMR: * CSS chunks added through HMR are not inserted at the right position to respect precedence (WEB-652). * Update aggregation is disabled because we don't want a critical issue to stop all HMR (WEB-582) . This would be fixed by applying aggregated updates when dismissing the error modal, but there are some edge cases with this too (e.g. what happens when an HMR update also causes an error on top of an existing error). |
||
---|---|---|
.. | ||
next-swc/crates |