
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
rollup-plugin-auto-external
Advanced tools
Rollup plugin to automatically exclude package.json dependencies and peerDependencies from your bundle
Rollup plugin to automatically exclude package.json dependencies and peerDependencies from your bundle.
npm install --save-dev rollup-plugin-auto-external
rollup.config.js
import autoExternal from 'rollup-plugin-auto-external';
export default {
input: 'index.js',
plugins: [autoExternal()],
};
rollup.config.js
with optionsimport path from 'path';
import autoExternal from 'rollup-plugin-auto-external';
export default {
input: 'index.js',
plugins: [
autoExternal({
builtins: false,
dependencies: true,
packagePath: path.resolve('./packages/module/package.json'),
peerDependencies: false,
}),
],
};
rollup.config.js
with externalrollup-plugin-auto-external
does not overwrite the external option. The two can happily coexist.
import autoExternal from 'rollup-plugin-auto-external';
export default {
input: 'index.js',
external: id => id.includes('babel-runtime'),
plugins: [autoExternal()],
};
rollup.config.js
with per format optionsimport autoExternal from 'rollup-plugin-auto-external';
export default ['es', 'umd'].map(format => ({
input: 'index.js',
plugins: [
autoExternal({
dependencies: format === 'es',
}),
],
}));
builtins
boolean
|string
: defaults to true
. Add all Node.js builtin modules (in the running version) as externals. Specify a string
value (e.g., '6.0.0'
) to add all builtin modules for a specific version of Node.js.
Rollup will complain if builtins
is present, and the build target is a browser. You may want rollup-plugin-node-builtins.
dependencies
boolean
: defaults to true
.
packagePath
string
: defaults to process.cwd()
. Path to a package.json file or its directory.
peerDependencies
boolean
: defaults to true
.
FAQs
Rollup plugin to automatically exclude package.json dependencies and peerDependencies from your bundle
The npm package rollup-plugin-auto-external receives a total of 20,931 weekly downloads. As such, rollup-plugin-auto-external popularity was classified as popular.
We found that rollup-plugin-auto-external demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.