core icon indicating copy to clipboard operation
core copied to clipboard

feat: recursive search for shared version

Open robdonn opened this issue 1 year ago • 5 comments

Description

Allows @module-federation/enhanced to recursively search for the version of a shared module when it is not defined in it's closest package.json. A common pattern for monorepos is to have dependencies installed in the root package.json.

/monorepo
├── package.json        <---------- "lib1" dependency defined here
├── apps
│   ├── app1
│   │   ├── package.json
│   │   ├── node_modules
│   │   ├── webpack.config.js     <-------- "lib1" added to "shared" configuration here
│   │   └── src
│   │       ├── index.js
│   │       └── ...
│   └── app2
│       ├── package.json
│       ├── node_modules
│   │   ├── webpack.config.js
│       └── src
│           ├── index.js
│           └── ...
└── node_modules

Related Issue

#2680

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)

Checklist

  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.
  • [x] I have updated the documentation.

robdonn avatar Jun 28 '24 11:06 robdonn