fix(manifest): add default exposes fields if enable disableAssetsAnalyze#3396
fix(manifest): add default exposes fields if enable disableAssetsAnalyze#3396
Conversation
🦋 Changeset detectedLatest commit: e53d36d The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Summary
This pull request fixes an issue in the manifest module by adding default exposes fields if the disableAssetsAnalyze option is enabled. The changes are focused on the ModuleHandler and StatsManager classes.
The key changes are:
- A new
getExposeItemfunction has been added to theModuleHandlerclass, which creates aStatsExposeobject with default values for various properties (path, id, name, requires, file, and assets). This function is then used to populate theexposesMapobject with the necessary data for each exposed module. - In the
StatsManagerclass, the code has been updated to add the default exposes fields to the stats object if thedisableAssetsAnalyzeoption is enabled. This ensures that the exposes information is properly included in the generated stats, even when the asset analysis is disabled.
These changes help to maintain the integrity of the exposes data in the generated stats, even when the asset analysis feature is disabled. This will improve the overall reliability and consistency of the manifest module's functionality.
File Summaries
| File | Summary |
|---|---|
| packages/manifest/src/ModuleHandler.ts | The code changes introduce a new function getExposeItem that creates a StatsExpose object with default values for the path, id, name, requires, file, and assets properties. This function is then used within the ModuleHandler class to populate the exposesMap object with the necessary data for each exposed module. |
| packages/manifest/src/StatsManager.ts | The code changes add default exposes fields to the stats object if the disableAssetsAnalyze option is enabled. This ensures that the exposes information is properly included in the generated stats, even when the asset analysis is disabled. |
There was a problem hiding this comment.
Incremental Review
Comments posted: 6
Configuration
Squadron Mode: essential
Commits Reviewed
222aa5baea6024ee73167a0f4993b91bf78a2fdb...e53d36d4c7b9180deeaf3156b358579061ab4211
Files Reviewed
- packages/manifest/src/ModuleHandler.ts
- packages/manifest/src/StatsManager.ts
Files Ignored
These files were ignored due to the filter in the squadron.yaml file.
- .changeset/metal-bags-admire.md
Description
add default exposes fields if enable disableAssetsAnalyze
Related Issue
Types of changes
Checklist