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.
Plugin
✓ const { Plugin } = require('webpack-mild-compile');
✗ const WebpackMildCompile = require('webpack-mild-compile'); new WebpackMildCompile();
Plugin is exported as a named export. Directly calling the module as a function without .Plugin is incorrect for the plugin usage.
default
✓ const mildCompile = require('webpack-mild-compile'); mildCompile(compiler);
✗ const mildCompile = require('webpack-mild-compile').default;
The module exports a function directly for Node API usage. There is no .default export.
Plugin
✓ import { Plugin } from 'webpack-mild-compile';
ESM import works as expected. The package provides TypeScript types.
Shows how to use webpack-mild-compile as a webpack plugin or via Node API to avoid endless recompilation during watch mode.
// Webpack plugin usage (prevent endless recompilation)
const { Plugin } = require('webpack-mild-compile');
// webpack.config.js
module.exports = {
// ... other config
plugins: [
new Plugin()
]
};
// Or Node API usage (with webpack and koa-webpack)
const webpack = require('webpack');
const config = require('./webpack.config.js');
const compiler = webpack(config);
require('webpack-mild-compile')(compiler);
const app = new (require('koa'))();
const koaWebpack = require('koa-webpack');
app.use(koaWebpack({ compiler }));
Debug
Known issues
gotchaPlugin must be instantiated with `new Plugin()` — calling the module as a function for plugin usage does nothing.fixUse `new (require('webpack-mild-compile').Plugin)()` or import the named export. affects: >=1.0.0
deprecatedNo known deprecations in current version.
breakingNo known breaking changes between versions.
Errors
Common errors & fixes
TypeError: webpackMildCompile is not a constructor
Trying to use the default export as a constructor for the plugin (e.g., `new require('webpack-mild-compile')()`).
fixUse the named export `Plugin` instead: `new (require('webpack-mild-compile').Plugin)()`. Cannot find module 'webpack-mild-compile'
Package not installed or not in node_modules.
fixRun `npm install --save-dev webpack-mild-compile`.
Audit
Dependencies
No dependency data recorded yet.