Open ScriptedAlchemy opened 8 hours ago
Latest commit: 40ae81768f47bbce75b3d6f88dfb5826a1d94774
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Name | Link |
---|---|
Latest commit | 40ae81768f47bbce75b3d6f88dfb5826a1d94774 |
Latest deploy log | https://app.netlify.com/sites/module-federation-docs/deploys/67456a137ffba5000858d18f |
Deploy Preview | https://deploy-preview-3276--module-federation-docs.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Description
This pull request introduces several enhancements and fixes to the module sharing functionality in the
enhanced
package. The changes include updating theConsumeSharedModule
andConsumeSharedPlugin
to support module layers, adding a new Jest command to thepackage.json
, and updating schema validation for theConsumeSharedPlugin
.Enhancements to Module Sharing:
packages/enhanced/src/lib/sharing/ConsumeSharedModule.ts
: Added support for specifying and resolving module layers with new properties (layer
,issuerLayer
,requiredLayer
) in theConsumeOptions
type and updated theConsumeSharedModule
class accordingly. [1] [2] [3] [4] [5]packages/enhanced/src/lib/sharing/ConsumeSharedPlugin.ts
: Updated theConsumeSharedPlugin
class to handle layer-specific requests and factorize modules based on layer context. AddedissuerLayer
andrequiredLayer
properties to the plugin options. [1] [2] [3] [4] [5] [6] [7] [8]Updates to
package.json
:package.json
: Added a new Jest command ("enhanced:jest": "pnpm build && cd packages/enhanced && NODE_OPTIONS=--experimental-vm-modules npx jest test/ConfigTestCases.basictest.js"
) and updated thewebpack-cli
dependency to version^5.1.4
. [1] [2]Schema Validation:
packages/enhanced/src/schemas/sharing/ConsumeSharedPlugin.check.ts
: Added TypeScript-based validation functions for theConsumeSharedPlugin
schema to ensure proper validation of the new properties.Note
Runtime module aspects still need to be updated, this is the compiler mechanics only for module. Runtime parts will likely be done once the other half of share plugin has layer support
Related Issue
Types of changes
Checklist