A Karma preprocessor plugin that integrates Rollup for on-the-fly bundling and ES2015+ transpilation in test environments. Current version is 0.2.4 (stable, but rarely updated). It supports Rollup plugins, source maps (inline), and multiple ES versions via Babel or Buble. Compared to alternatives like karma-rollup-preprocessor, this plugin is simpler, more actively maintained at the time, and more aligned with the Rollup ecosystem. However, it lacks modern Rollup features and may not work with Rollup >=1.0.
npm install karma-rollup-pluginVerified import paths — ran on the pinned version, not inferred.
Configures Karma to use the rollup preprocessor for test files, with Rollup and Buble plugin for transpilation.
Upgrade to a maintained fork or use karma-rollup-preprocessor with Rollup compatibility.
Consider using @open-wc/karma-esm or karma-rollup-preprocessor.
Always specify a module name when using 'umd', or use 'iife' for tests.
Set sourceMap: 'inline' in rollupPreprocessor config.
Run: npm install rollup --save-dev
Install Rollup 0.x: npm install rollup@0.68.2 --save-dev
Add moduleName to rollupPreprocessor or switch to 'iife'.