docs(guide): clarify manifest.json structure and valid chunk types in backend integration #21043
+59
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #20858
Improves the Backend Integration Guide by clarifying the
manifest.jsonstructure and addressing confusion about which chunk types can have specific fields.Key Improvements
Clarified chunk type distinctions:
Added explicit documentation explaining that only JS chunks can have
imports,dynamicImports,css, andassetsfields, while CSS files and asset chunks only havefile,src, and optionallyisEntry/namefields.Enhanced processing instructions:
Updated step-by-step instructions to emphasize that CSS files and assets in the manifest do not have imports, preventing incorrect recursive processing.
Improved pseudo-implementation documentation:
Added notes to the
importedChunksfunction example clarifying that it only processes JS chunks and that CSS dependencies are accessed via thecssfield.Added “Common Questions” section:
New FAQ section addresses:
cssarray)Additional Context
The documentation now makes it clear that the hypothetical scenario in #20858 (CSS chunks with
importsand nestedcssfields) is invalid because CSS files areOutputAssettypes that don’t support these fields.This should prevent confusion for developers implementing custom backend integrations.