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
muslnode 18–226 runs
build_error
glibcnode 18–226 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'
}
};
};
Errors
Common errors & fixes
Error: Cannot find module 'wallaby-webpack'
Package not installed.
fixRun 'npm install wallaby-webpack --save-dev'.
TypeError: wallabyWebpack is not a function
Incorrect import (named instead of default).
fixUse 'const wallabyWebpack = require("wallaby-webpack");'. Module parse failed: Unexpected token
Missing loaders for file types (e.g., JSON).
fixAdd appropriate loader to webpack config in postprocessor.
Audit
Dependencies
wallaby.jsrequiredRequires Wallaby.js test runner to function.