-
-
Notifications
You must be signed in to change notification settings - Fork 302
feat(enhanced): prefix share exclusion #3736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Description
This pull request introduces several changes to enhance the sharing behavior in the Module Federation Plugin by adding support for request filtering, improving schema validation, and updating related plugins. Key changes include the addition of a
filter
property to shared configurations, updates to schema validation logic, and integration of these updates into theConsumeSharedPlugin
,ProvideSharedPlugin
, andSharePlugin
classes.Enhancements to Sharing Configuration:
filter
property to shared configurations, allowing request filtering using regular expressions. This property was integrated into theConsumeSharedPlugin
andProvideSharedPlugin
classes to skip certain requests during module sharing. ([[1]](https://github.com/module-federation/core/pull/3736/files#diff-c97c2d9884d2a584a0dd77bf52955badffbbdbb18eda2eb243a76a1ed0f95d7dR139)
,[[2]](https://github.com/module-federation/core/pull/3736/files#diff-c97c2d9884d2a584a0dd77bf52955badffbbdbb18eda2eb243a76a1ed0f95d7dR337-R344)
,[[3]](https://github.com/module-federation/core/pull/3736/files#diff-c7bf95f42a5abd6e44a1670123e4f64605c1d7c4826f1d019f2474beb72971cbR96)
,[[4]](https://github.com/module-federation/core/pull/3736/files#diff-c7bf95f42a5abd6e44a1670123e4f64605c1d7c4826f1d019f2474beb72971cbR112)
,[[5]](https://github.com/module-federation/core/pull/3736/files#diff-c7bf95f42a5abd6e44a1670123e4f64605c1d7c4826f1d019f2474beb72971cbR236-R242)
,[[6]](https://github.com/module-federation/core/pull/3736/files#diff-981a75bcd0aa5f3fbd0fbfa80a3a67300604c5ab3990bc692f2f65f1480aa1b4R69)
,[[7]](https://github.com/module-federation/core/pull/3736/files#diff-981a75bcd0aa5f3fbd0fbfa80a3a67300604c5ab3990bc692f2f65f1480aa1b4R87)
)Schema Validation Improvements:
ModuleFederationPlugin.check.ts
to include the newfilter
property. This includes defining theFilter
schema, validating its structure, and ensuring compatibility with existing configurations. ([[1]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2R239)
,[[2]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2R271-R275)
,[[3]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2R1447)
,[[4]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2R1492-R1515)
,[[5]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L1551-R1586)
,[[6]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L1615-R1650)
,[[7]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L1652-R1693)
,[[8]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L1684-R1724)
,[[9]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2R1793)
,[[10]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L1886-R1927)
,[[11]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L1899-R1950)
,[[12]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L1931-R1975)
,[[13]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L1957-R1999)
,[[14]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L2002-R2043)
,[[15]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L2056-R2097)
,[[16]](https://github.com/module-federation/core/pull/3736/files#diff-4c59fef2280dfcc41884349a0ef4a05bc0ad4ea79f94d9507ed5807ac9cfb7a2L2113-R2154)
)Integration with SharePlugin:
SharePlugin
class to ensure that the newfilter
property and other configurations conform to the updated schema. ([packages/enhanced/src/lib/sharing/SharePlugin.tsR19-R37](https://github.com/module-federation/core/pull/3736/files#diff-981a75bcd0aa5f3fbd0fbfa80a3a67300604c5ab3990bc692f2f65f1480aa1b4R19-R37)
)Miscellaneous:
vitest.config.ts
, for thebridge-react
package, which sets up testing withjsdom
and includes relevant test files. ([packages/bridge/bridge-react/vitest.config.ts.timestamp-1745940718757-9bccf2220159f.mjsR1-R27](https://github.com/module-federation/core/pull/3736/files#diff-399c19623c6e719af318602656c016a09ec0a47a025d36ce86e2226a5fe85f14R1-R27)
)Related Issue
Types of changes
Checklist