Registry / devops / webpack-command

webpack-command

JSON →
library0.5.1jsnpmunverified

webpack-command (v0.5.1) is a lightweight, modular CLI for webpack 4 that provides an enhanced user experience over webpack-cli. It features extendable configurations, custom reporters, support for configs in JSON/YAML/JS, and did-you-mean flag suggestions. Requires Node >=8.9.0 and webpack ^4.4.0. The package is in maintenance mode; the recommended successor is webpack-nano. Key differentiator: significantly smaller package size (24% of webpack-cli) and richer default output via webpack-stylish. Release cadence: irregular, last release 0.5.1.

npm install webpack-command
INSTALL
IMPORT
SIG · WEBPACK-COMMAND
W
webpack-command
devopsjavascriptv0.5.1
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.

webpack-command (CLI)
wp --help
webpack --help
The primary binary is `wp` to avoid conflict with webpack-cli. The `webpack` binary may also be used if no other webpack CLI is installed.
Programmatic API (not officially exported)
const webpackCmd = require('webpack-command');
import webpackCmd from 'webpack-command';
webpack-command is primarily a CLI tool; its programmatic API is not well documented and may not be stable. CommonJS require is used.
Custom reporter
// Implement your own reporter by passing --reporter option
No official export for reporter interface. See documentation for creating custom reporters via configuration.

Install webpack-command and webpack as dev dependencies, then run the CLI with entry and output files.

npm install webpack-command webpack --save-dev # basic usage: wp ./src/index.js --output ./dist/bundle.js
webpack-command --version
Debug
Known issues
breakingNode v8 minimum: version 0.5.0 dropped support for Node v6.
fix
Upgrade Node to >=8.9.0.
affects: >=0.5.0
deprecatedwebpack-command is in maintenance mode. The recommended alternative is webpack-nano.
fix
Migrate to webpack-nano (https://www.npmjs.com/package/webpack-nano).
affects: *
gotchaCannot be installed alongside webpack-cli because both export a 'webpack' binary.
fix
Uninstall webpack-cli before installing webpack-command: npm uninstall webpack-cli.
affects: *
gotchaRequires webpack ^4.4.0; not compatible with webpack 5.
fix
Use webpack 4.x or switch to a webpack 5-compatible CLI like webpack-cli.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'webpack'
webpack is not installed or is a devDependency not available globally.
fix
Run `npm install webpack --save-dev` and use npx or local node_modules.
Error: webpack-command cannot be installed together with webpack-cli.
Both packages export a 'webpack' binary, causing conflicts.
fix
Run `npm uninstall webpack-cli` and then install webpack-command.
Error: Unknown argument: --mode
The --mode flag is not supported by webpack-command; use --define-process-env-node-env or configuration file.
fix
Set mode in webpack config (module.exports.mode) or use environment variable NODE_ENV.
Upgrade
Version history
0.5.1latest on npm
Audit
Dependencies
webpackrequiredpeer dependency: webpack-command requires webpack ^4.4.0
Agent activity
13 hits · last 30 days
node
12
Resources
webpack-command — npm install webpack-command · libregistry