Rollup plugin that removes blocks of code delimited by special comment tags (/* develblock:start */ and /* develblock:end */ by default) from bundled output. Useful for stripping development-only code such as verbose console warnings, assertions, or debug logs from production builds. Current version 1.0.3 has no updates since release; low maintenance cadence. Differentiators: simple comment-based approach vs AST-based plugins like rollup-plugin-strip-code; no configuration required for basic use.
npm install rollup-plugin-strip-blocksVerified import paths — ran on the pinned version, not inferred.
Basic rollup config using the strip-blocks plugin to remove development blocks from the output bundle.
Add a minifier or code removal plugin after strip-blocks.
Ensure your delimiters are block comments: /* develblock:start */ and /* develblock:end */.
Consider using rollup-plugin-strip-code as a more modern alternative.
Use exactly the default tags or override with custom tags via options.
Run: npm install --save-dev rollup-plugin-strip-blocks
Use: import stripblocks from 'rollup-plugin-strip-blocks'
Ensure blocks are wrapped with /* develblock:start */ and /* develblock:end */ (default). Check for typos.