{"id":20172,"library":"karma-webpack-with-fast-source-maps","title":"karma-webpack-with-fast-source-maps","description":"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.","status":"maintenance","version":"1.10.2","language":"javascript","source_language":"en","source_url":"https://github.com/aaronjensen/karma-webpack","tags":["javascript"],"install":[{"cmd":"npm install karma-webpack-with-fast-source-maps","lang":"bash","label":"npm"},{"cmd":"yarn add karma-webpack-with-fast-source-maps","lang":"bash","label":"yarn"},{"cmd":"pnpm add karma-webpack-with-fast-source-maps","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: integrates with webpack (v1 to v3)","package":"webpack","optional":false}],"imports":[{"note":"This package is a preprocessor plugin, not a framework. Do not register it as a framework or plugin.","wrong":"plugins: ['karma-webpack-with-fast-source-maps']","symbol":"plugin","correct":"// In karma.conf.js, set frameworks: ['karma-webpack-with-fast-source-maps'] is not needed; just specify preprocessor"},{"note":"The preprocessor name is 'webpack', not the full package name.","wrong":"preprocessors: { 'test/**/*.js': ['karma-webpack-with-fast-source-maps'] }","symbol":"preprocessor","correct":"preprocessors: { 'test/**/*.js': ['webpack'] }"},{"note":"Using 'source-map' gives slower inline maps, 'cheap-module-source-map' is recommended for speed.","wrong":"webpack: { devtool: 'source-map' }","symbol":"webpackOptions","correct":"webpack: { devtool: 'cheap-module-source-map', ... }"}],"quickstart":{"code":"// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    browsers: ['ChromeHeadless'],\n    frameworks: ['jasmine'],\n    files: ['test/test_index.js'],\n    preprocessors: {\n      'test/test_index.js': ['webpack']\n    },\n    webpack: {\n      devtool: 'cheap-module-source-map',\n      module: {\n        rules: [\n          { test: /\\.js$/, exclude: /node_modules/, use: 'babel-loader' }\n        ]\n      }\n    },\n    webpackMiddleware: { noInfo: true },\n    singleRun: true\n  });\n};","lang":"javascript","description":"Karma configuration using karma-webpack-with-fast-source-maps with webpack preprocessor, fast source maps, and a single test entry point."},"warnings":[{"fix":"Replace with 'karma-webpack' and update configuration for version 5.","message":"Package is deprecated; use karma-webpack v5+ for webpack 4/5 support.","severity":"deprecated","affected_versions":"all"},{"fix":"Upgrade to karma-webpack v4+ for webpack 4 support, or v5+ for webpack 5.","message":"Incompatible with webpack 4 and 5. Only supports webpack 1-3.","severity":"breaking","affected_versions":">=1.0"},{"fix":"Use 'webpack' as preprocessor name, e.g., preprocessors: { 'test.js': ['webpack'] }.","message":"Preprocessor name is 'webpack' not the package name.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure test entry file declares var __karmaWebpackManifest__ = []; before using it.","message":"The __karmaWebpackManifest__ variable is required in test entry file for selective test running; missing it may cause unexpected behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Add babel-loader or similar to webpack config to transpile ES modules.","message":"No support for ES modules (ESM) natively; requires Babel or other transpilation.","severity":"breaking","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: npm install --save-dev karma-webpack-with-fast-source-maps","cause":"Package not installed or misspelled in npm install.","error":"Module not found: Error: Can't resolve 'karma-webpack-with-fast-source-maps'"},{"fix":"Run: npm install --save-dev webpack@3 (or compatible version)","cause":"Missing peer dependency webpack.","error":"Error: Cannot find module 'webpack'"},{"fix":"Add webpack: { ... } to karma.conf.js","cause":"Missing webpack configuration in Karma config.","error":"TypeError: Cannot read property 'webpack' of undefined"},{"fix":"Ensure preprocessors is a top-level config key with object value: preprocessors: { 'test.js': ['webpack'] }","cause":"Misplaced preprocessors or incorrect format in karma.conf.js","error":"Error: 'preprocessors' should be an object"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}