A Rollup plugin that conditionally skips file emission during build. v1.3.0 supports Rollup 1.x through 4.x as peer dependencies and ships TypeScript typings. It provides a `match` function receiving the filename and output chunk/asset to decide which generated files to suppress. Unlike Rollup's built-in `output.preserveModules` or `output.emitFile` controls, this plugin gives fine-grained per-file filtering without altering bundle structure. The deprecated `RollupNoEmitOptions` interface has been replaced by `Options`. Simple API with two options: `emit` (boolean override) and `match` (predicate). No runtime dependencies.
npm install rollup-plugin-no-emitVerified import paths — ran on the pinned version, not inferred.
Example rollup.config.js using noEmit with a match function that skips emission of 'index.js' chunks.
Replace type references from RollupNoEmitOptions to Options.
Update match callback to accept the new signature: (fileName, output) => boolean.
Ensure Rollup configuration has output specified.
Test match conditions thoroughly when combining with other output options.
Check that output.dir or output.file is set in Rollup config.
Use const noEmit = require('rollup-plugin-no-emit').default; or switch to ESM import.Run npm install --save-dev rollup-plugin-no-emit
Use import type { Options } from 'rollup-plugin-no-emit';