
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-multi-input
Advanced tools
:warning: Do you really need rollup-plugin-multi-input?
Take a look at the rollup preserveModules and preserveModulesRoot options.
A rollup plugin to bundle modular libraries with sub directories.
src
tree structure in the dist
folder.Install via npm or yarn.
npm i -D rollup-plugin-multi-input
yarn add rollup-plugin-multi-input
In the rollup configuration
import multiInput from 'rollup-plugin-multi-input';
export default {
// use glob in the input
input: ['src/**/*.js'],
output: {
format: 'esm',
dir: 'dist'
},
plugins: [ multiInput() ],
};
If using a rollup version lower than 1.0.0
enable experimentalCodeSplitting
.
It's possible to mix input
type.
input: ['src/**/*.js']
// DO 👍
input: [{
output1: 'src/output1.js'
}]
// DON'T ❌ (glob not supported yet)
input: [{
output1: 'src/**/*.js'
}]
input: ['src/more/**/*.js', 'src/more2/**/*.js', {
output1: 'src/output1.js'
}]
'src/'
Specify the relative path to use in the dist folder.
Example:
import multiInput from 'rollup-plugin-multi-input';
export default {
input: ['src/bar.js', 'src/foo/bar.js'],
output: {
format: 'esm',
dir: 'dist'
},
plugins: [ multiInput({ relative: 'src/' }) ],
};
// create the files dist/bar.js and dist/foo/bar.js
A callback for transforming output file path.
Example:
import multiInput from 'rollup-plugin-multi-input';
import path from 'path';
export default {
input: ['src/bar.js', 'src/foo/bar.js'],
output: {
format: 'esm',
dir: 'dist'
},
plugins: [ multiInput({
relative: 'src/',
transformOutputPath: (output, input) => `awesome/path/${path.basename(output)}`,
}) ],
};
// create the files awesome/path/bar.js and awesome/path/foo/bar.js
{}
fast-glob object configuration.
FAQs
rollup plugin for bundling modular libraries
The npm package rollup-plugin-multi-input receives a total of 55,246 weekly downloads. As such, rollup-plugin-multi-input popularity was classified as popular.
We found that rollup-plugin-multi-input 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.