You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to cherry pick lodash module. In the module federation plugin configuration, i tried to share this module, but I noticed multiple instance of lodash is loaded, when hosting remote component. My understanding was, if remote component has lodash as dependency, it wont be loaded twice, if specified as shared. Does sharing works when cherry picking modules in a library? if not, what are the other options? Please advise.
import has from 'lodash/has';
My webpack module federation configuration:
const { ModuleFederationPlugin } = require('webpack').container;
module.exports = {
plugins: [
new ModuleFederationPlugin({
// adds lodash as shared module
// version is inferred from package.json
// there is no version check for the required version
// so it will always use the higher version found
shared: ['lodash'],
}),
],
};
The text was updated successfully, but these errors were encountered:
I'm trying to cherry pick lodash module. In the module federation plugin configuration, i tried to share this module, but I noticed multiple instance of lodash is loaded, when hosting remote component. My understanding was, if remote component has lodash as dependency, it wont be loaded twice, if specified as shared. Does sharing works when cherry picking modules in a library? if not, what are the other options? Please advise.
import has from 'lodash/has';
My webpack module federation configuration:
const { ModuleFederationPlugin } = require('webpack').container;
module.exports = {
plugins: [
new ModuleFederationPlugin({
// adds lodash as shared module
// version is inferred from package.json
// there is no version check for the required version
// so it will always use the higher version found
shared: ['lodash'],
}),
],
};
The text was updated successfully, but these errors were encountered: