
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
@module-federation/automatic-vendor-federation
Advanced tools
Utility to enable automatic vendor sharing within bundles using Module Federation
Utility to enable automatic vendor sharing within bundles using Module Federation
yarn install @module-federation/automatic-vendor-sharing -D
There are a few arguments you can pass to the utility.
exclude
: allows you to filter out any packages including part of the string.packageJson
: pass your apps package.json
: eg: require("./package.json");
ignoreVersion
: you can ignore versions on some shared packages. This utility supports versioned dependencies, which is a problem when using React as there can only be one version on the pageignorePatchVersion
: ignore patch numbers and share dependencies based on a minor version matching. lodash-4.11 instead of lodash-4.11.7shareFrom
: choose where in package.json the utility should share from. ['dependencies','peerDependencies']
/ (default: dependencies
)const AutomaticVendorFederation = require("@module-federation/automatic-vendor-federation");
const { ModuleFederationPlugin } = require("webpack").container;
const packageJson = require("./package.json");
const exclude = ["babel", "plugin", "preset", "webpack", "loader", "serve"];
const ignoreVersion = ["react", "react-dom"];
module.export = {
//... rest of your config
plugins: [
new ModuleFederationPlugin({
name: "app2",
library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
remotes: {
app1: "app1",
},
exposes: {
Button: "./src/Button",
},
shared: AutomaticVendorFederation({
exclude,
ignoreVersion,
packageJson,
shareFrom: ["dependencies", "peerDependencies"],
ignorePatchVersion: true,
}),
}),
],
};
FAQs
Utility to enable automatic vendor sharing within bundles using Module Federation
The npm package @module-federation/automatic-vendor-federation receives a total of 7,916 weekly downloads. As such, @module-federation/automatic-vendor-federation popularity was classified as popular.
We found that @module-federation/automatic-vendor-federation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.