{"id":20702,"library":"wallaby-webpack","title":"wallaby-webpack","description":"Wallaby.js postprocessor for webpack build support. Version 3.9.16 is current stable. Integrates webpack into Wallaby.js test runner, enabling module resolution, loaders, and plugins during testing. Key differentiator: allows using existing webpack configs with Wallaby for seamless testing of webpack-bundled projects.","status":"maintenance","version":"3.9.16","language":"javascript","source_language":"en","source_url":"https://github.com/jeffling/wallaby-webpack","tags":["javascript"],"install":[{"cmd":"npm install wallaby-webpack","lang":"bash","label":"npm"},{"cmd":"yarn add wallaby-webpack","lang":"bash","label":"yarn"},{"cmd":"pnpm add wallaby-webpack","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Requires Wallaby.js test runner to function.","package":"wallaby.js","optional":false}],"imports":[{"note":"CommonJS require is standard; ESM import may fail in Node environments without transpilation.","wrong":"import wallabyWebpack from 'wallaby-webpack';","symbol":"wallabyWebpack","correct":"const wallabyWebpack = require('wallaby-webpack');"},{"note":"Default export only; named import will result in undefined.","wrong":"import { wallabyWebpack } from 'wallaby-webpack';","symbol":"wallabyWebpack","correct":"import wallabyWebpack from 'wallaby-webpack';"},{"note":"With TypeScript and esModuleInterop, default import works; otherwise use namespace import.","wrong":"import wallabyWebpack from 'wallaby-webpack'; (may need esModuleInterop)","symbol":"TypeScript import","correct":"import * as wallabyWebpack from 'wallaby-webpack';"}],"quickstart":{"code":"// wallaby.config.js\nconst wallabyWebpack = require('wallaby-webpack');\n\nmodule.exports = function (w) {\n  return {\n    files: ['src/**/*.js', 'test/**/*.js'],\n    tests: ['test/**/*.spec.js'],\n    compilers: { '**/*.js': w.compilers.babel() },\n    postprocessor: wallabyWebpack({\n      resolve: {\n        alias: { '@': 'src' }\n      },\n      externals: {\n        'fs': true\n      },\n      module: {\n        loaders: [\n          { test: /\\.json$/, loader: 'json-loader' },\n          { test: /\\.html$/, loader: 'html-loader' }\n        ]\n      }\n    }),\n    env: {\n      type: 'node'\n    }\n  };\n};","lang":"javascript","description":"Configure Wallaby.js to use webpack postprocessor with custom webpack options."},"warnings":[{"fix":"Replace 'module.loaders' with 'module.rules' in webpack config.","message":"webpack 1 loaders syntax is deprecated. Use 'module.rules' instead.","severity":"deprecated","affected_versions":">=3.0"},{"fix":"Add externals such as 'fs' or 'path' to avoid bundling Node built-ins.","message":"External modules may not be properly resolved if not configured.","severity":"gotcha","affected_versions":">=3.0"},{"fix":"Ensure 'postprocessor' appears after 'compilers' in the config object.","message":"Postprocessor must be placed after compilers in configuration.","severity":"gotcha","affected_versions":">=3.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install wallaby-webpack --save-dev'.","cause":"Package not installed.","error":"Error: Cannot find module 'wallaby-webpack'"},{"fix":"Use 'const wallabyWebpack = require(\"wallaby-webpack\");'.","cause":"Incorrect import (named instead of default).","error":"TypeError: wallabyWebpack is not a function"},{"fix":"Add appropriate loader to webpack config in postprocessor.","cause":"Missing loaders for file types (e.g., JSON).","error":"Module parse failed: Unexpected token"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}