Registry / testing / karma-webpack-with-fast-source-maps

karma-webpack-with-fast-source-maps

JSON →
library1.10.2jsnpmunverified

A fork of karma-webpack that adds support for file-based source maps and hot testing. Version 1.10.2 supports webpack 1-3. It allows running only affected tests on file changes using a manifest array, and provides faster source map generation via 'cheap-module-source-map' devtool. This package is largely superseded by modern karma-webpack versions (5+) that include better source map support and webpack 5 compatibility. It is not actively maintained and should not be used for new projects.

npm install karma-webpack-with-fast-source-maps
INSTALL
IMPORT
SIG · KARMA-WEBPACK-WITH
K
karma-webpack-with-fast-source-maps
testingjavascriptv1.10.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
// In karma.conf.js, set frameworks: ['karma-webpack-with-fast-source-maps'] is not needed; just specify preprocessor
plugins: ['karma-webpack-with-fast-source-maps']
This package is a preprocessor plugin, not a framework. Do not register it as a framework or plugin.
preprocessor
preprocessors: { 'test/**/*.js': ['webpack'] }
preprocessors: { 'test/**/*.js': ['karma-webpack-with-fast-source-maps'] }
The preprocessor name is 'webpack', not the full package name.
webpackOptions
webpack: { devtool: 'cheap-module-source-map', ... }
webpack: { devtool: 'source-map' }
Using 'source-map' gives slower inline maps, 'cheap-module-source-map' is recommended for speed.

Karma configuration using karma-webpack-with-fast-source-maps with webpack preprocessor, fast source maps, and a single test entry point.

// karma.conf.js module.exports = function(config) { config.set({ browsers: ['ChromeHeadless'], frameworks: ['jasmine'], files: ['test/test_index.js'], preprocessors: { 'test/test_index.js': ['webpack'] }, webpack: { devtool: 'cheap-module-source-map', module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' } ] } }, webpackMiddleware: { noInfo: true }, singleRun: true }); };
Debug
Known issues
deprecatedPackage is deprecated; use karma-webpack v5+ for webpack 4/5 support.
fix
Replace with 'karma-webpack' and update configuration for version 5.
affects: all
breakingIncompatible with webpack 4 and 5. Only supports webpack 1-3.
fix
Upgrade to karma-webpack v4+ for webpack 4 support, or v5+ for webpack 5.
affects: >=1.0
gotchaPreprocessor name is 'webpack' not the package name.
fix
Use 'webpack' as preprocessor name, e.g., preprocessors: { 'test.js': ['webpack'] }.
affects: all
gotchaThe __karmaWebpackManifest__ variable is required in test entry file for selective test running; missing it may cause unexpected behavior.
fix
Ensure test entry file declares var __karmaWebpackManifest__ = []; before using it.
affects: all
breakingNo support for ES modules (ESM) natively; requires Babel or other transpilation.
fix
Add babel-loader or similar to webpack config to transpile ES modules.
affects: all
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'karma-webpack-with-fast-source-maps'
Package not installed or misspelled in npm install.
fix
Run: npm install --save-dev karma-webpack-with-fast-source-maps
Error: Cannot find module 'webpack'
Missing peer dependency webpack.
fix
Run: npm install --save-dev webpack@3 (or compatible version)
TypeError: Cannot read property 'webpack' of undefined
Missing webpack configuration in Karma config.
fix
Add webpack: { ... } to karma.conf.js
Error: 'preprocessors' should be an object
Misplaced preprocessors or incorrect format in karma.conf.js
fix
Ensure preprocessors is a top-level config key with object value: preprocessors: { 'test.js': ['webpack'] }
Upgrade
Version history
1.10.2latest on npm
Audit
Dependencies
webpackrequiredpeer dependency: integrates with webpack (v1 to v3)
Agent activity
2 hits · last 30 days
node
2
Resources
karma-webpack-with-fast-source-maps — npm install karma-webpack-with-fast-source-maps · libregistry