Karma preprocessor to bundle ES modules using Rollup. Current stable version 7.0.8 (last released 2021). Release cadence is sporadic with long gaps between major versions. Key differentiators: integrates Rollup into Karma test pipeline, supports all Rollup options, allows multiple configured preprocessors for different transpilation setups. Requires Rollup >=1.0.0 as peer dependency.
npm install karma-rollup-preprocessorVerified import paths — ran on the pinned version, not inferred.
Basic Karma configuration with rollupPreprocessor for bundling test files.
Replace require('rollup-plugin-buble') with require('@rollup/plugin-buble') and update configuration accordingly.Set `watched: false` in the files array for patterns handled by rollup preprocessor.
Do not specify `input` in rollupPreprocessor options; the preprocessor sets it to each test file.
Use relative paths or update to version 7.0.8 which includes a fix.
In preprocessors config, use 'rollup' as the preprocessor name, not 'rollupPreprocessor'.
Ensure rollupPreprocessor is defined inside config.set({...}) as a top-level key.Install missing npm packages and configure resolve plugins (e.g., @rollup/plugin-node-resolve).