Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

karma-rolldown-preprocessor

niksy0MIT1.0.1TypeScript support: included

Karma preprocessor to bundle ES modules using Rolldown.

es, es2015, karma, modules, import, export, plugin, preprocessor, karma-preprocessor, karma-plugin, karma-rollup, rollup, karma-rolldown, rolldown, vite, oxc

readme

karma-rolldown-preprocessor

Build Status

Karma preprocessor to bundle ES modules using Rolldown.

Fork of karma-rollup-preprocessor with Rolldown based implementation from Discord comment by Jeremy Scheff.

Install

npm install karma-rolldown-preprocessor --save-dev

Usage

All the options detailed in the Rolldown documentation can be passed to rolldownPreprocessor.

// karma.conf.js
export default function (config) {
    config.set({
        files: [
            /**
             * Make sure to disable Karma’s file watcher
             * because the preprocessor will use its own.
             */
            { pattern: 'test/**/*.spec.js', watched: false }
        ],
        preprocessors: {
            'test/**/*.spec.js': ['rolldown']
        },
        rolldownPreprocessor: {
            /**
             * This is just a normal Rolldown config object,
             * except that `input` is handled for you.
             */
            output: {
                format: 'iife', // Helps prevent naming collisions.
                name: '<your_project>', // Required for 'iife' format.
                sourcemap: 'inline' // Sensible for testing.
            }
        }
    });
}

License

MIT © Ivan Nikolić

changelog

Changelog

Unreleased

1.0.1 - 2025-11-15

Added

  • Karma configuration types

1.0.0 - 2025-11-15

Added

  • Initial implementation