A Rollup plugin that integrates the Preprocess library to conditionally include or exclude parts of files (HTML, JS, etc.) based on a user-defined context (e.g., DEBUG flags). The latest stable version is 0.0.4 (released November 2016). Development appears to be stalled with no recent releases or maintenance; this plugin is a thin wrapper around the `preprocess` package for Rollup build pipelines. Alternatives include `@rollup/plugin-replace` or direct use of `preprocess` with other Rollup hooks. The plugin supports simple context-based preprocessing but lacks extensive documentation and has limited adoption.
npm install rollup-plugin-preprocessVerified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin with a context object and use preprocess directives in source files.
Migrate to @rollup/plugin-replace or use the preprocess library directly with a custom Rollup plugin.
Manually specify the include and exclude options in the plugin configuration.
Pass nested values as flat keys or use a string expression that evaluates in the preprocess context.
npm install rollup-pluginutils --save-dev
Use import preprocess from 'rollup-plugin-preprocess' instead of import { preprocess } from 'rollup-plugin-preprocess'