Registry / testing / wallaby-webpack

wallaby-webpack

JSON →
library3.9.16jsnpmunverified

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.

npm install wallaby-webpack
INSTALL
IMPORT
SIG · WALLABY-WEBPACK
W
wallaby-webpack
testingjavascriptv3.9.16
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.

wallabyWebpack
const wallabyWebpack = require('wallaby-webpack');
import wallabyWebpack from 'wallaby-webpack';
CommonJS require is standard; ESM import may fail in Node environments without transpilation.
wallabyWebpack
import wallabyWebpack from 'wallaby-webpack';
import { wallabyWebpack } from 'wallaby-webpack';
Default export only; named import will result in undefined.
TypeScript import
import * as wallabyWebpack from 'wallaby-webpack';
import wallabyWebpack from 'wallaby-webpack'; (may need esModuleInterop)
With TypeScript and esModuleInterop, default import works; otherwise use namespace import.

Configure Wallaby.js to use webpack postprocessor with custom webpack options.

// wallaby.config.js const wallabyWebpack = require('wallaby-webpack'); module.exports = function (w) { return { files: ['src/**/*.js', 'test/**/*.js'], tests: ['test/**/*.spec.js'], compilers: { '**/*.js': w.compilers.babel() }, postprocessor: wallabyWebpack({ resolve: { alias: { '@': 'src' } }, externals: { 'fs': true }, module: { loaders: [ { test: /\.json$/, loader: 'json-loader' }, { test: /\.html$/, loader: 'html-loader' } ] } }), env: { type: 'node' } }; };
Debug
Known issues
deprecatedwebpack 1 loaders syntax is deprecated. Use 'module.rules' instead.
fix
Replace 'module.loaders' with 'module.rules' in webpack config.
affects: >=3.0
gotchaExternal modules may not be properly resolved if not configured.
fix
Add externals such as 'fs' or 'path' to avoid bundling Node built-ins.
affects: >=3.0
gotchaPostprocessor must be placed after compilers in configuration.
fix
Ensure 'postprocessor' appears after 'compilers' in the config object.
affects: >=3.0
Errors
Common errors & fixes
Error: Cannot find module 'wallaby-webpack'
Package not installed.
fix
Run 'npm install wallaby-webpack --save-dev'.
TypeError: wallabyWebpack is not a function
Incorrect import (named instead of default).
fix
Use 'const wallabyWebpack = require("wallaby-webpack");'.
Module parse failed: Unexpected token
Missing loaders for file types (e.g., JSON).
fix
Add appropriate loader to webpack config in postprocessor.
Upgrade
Version history
3.9.16latest on npm
Audit
Dependencies
wallaby.jsrequiredRequires Wallaby.js test runner to function.
Agent activity
9 hits · last 30 days
node
8
Resources
wallaby-webpack — npm install wallaby-webpack · libregistry