You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@skovhus thanks for checking and for opening the issue!
rollup doesn't provide the initial field and atm we are only using the chunk isDynamicEntry property. We will need to build the chunks dependency tree to detect the async status for a 2nd level chunk. Rollup provides data that can allow us to build the tree, we will have a look in the following days.
Yeah we are already using the transform to traverse our tree of dependencies and correct all initial flags. Great that you added lower level Rollup sources to that function.
vio
linked a pull request
Dec 23, 2024
that will
close
this issue
@skovhus, we are testing a fix on rollup-plugin-bundle-stats@1.2.4-beta.6. The initial flag is now looked up based on the issuer chunks, so if a chunk is synchronously loaded by an async chunk, it is flagged as not initial.
Let me know how it goes if you get the chance to try it. If you notice any issues, it would be very helpful if you could share the rollup stats JSON file(rollup-plugin-stats - no sources by default, you can send it as an attachment to the email address listed on my profile).
Currently the plugin detects if a chunk is initial based on the
[isDynamicEntry
information from rollup](https://github.com/relative-ci/rollup-plugin-webpack-stats/blob/master/src/transform.ts#L140). This is a pretty broken heuristic as a chunk might be synchronously imported by a chunk that is dynamic.Example
A (initial) lazy loads B that synchronously loads C.
Expected: C should not be marked
initial
Currently: C is marked as
initial
The text was updated successfully, but these errors were encountered: