Registry / devops / webpack-stream

webpack-stream

JSON →
library7.0.0jsnpmunverified

Run webpack as a stream to conveniently integrate with gulp. Version 7.0.0 requires webpack ^5.21.2 as a peer dependency and Node >= 10.0.0. Releases follow semver with active development. Key differentiators: simplifies piping webpack builds through gulp streams, supports watch mode with caching, and allows passing webpack config directly or via external config file.

npm install webpack-stream
INSTALL
IMPORT
SIG · WEBPACK-STREAM
W
webpack-stream
devopsjavascriptv7.0.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export
✓ import webpack from 'webpack-stream'
✗ const webpack = require('webpack-stream')
ESM is available; CommonJS also works with require.
require
✓ const webpack = require('webpack-stream')
CommonJS require is commonly used in gulpfile.js.
named export (none)
✓
Package only has default export; no named exports.

Basic usage: compile src/entry.js with webpack using an external config and output to dist/.

const gulp = require('gulp'); const webpack = require('webpack-stream'); const webpackConfig = require('./webpack.config.js'); gulp.task('default', () => { return gulp.src('src/entry.js') .pipe(webpack(webpackConfig)) .pipe(gulp.dest('dist/')); });
Debug
Known issues
breakingv7.0.0 dropped support for webpack < 5 and Node < 10.
fix
Upgrade to webpack ^5.21.2 and Node >= 10.
affects: >=7.0.0
gotchaDo not mix gulp.watch with webpack's watch option; they are mutually exclusive.
fix
Use gulp.watch or webpack's watch, not both.
affects: *
gotchaWhen using gulp.watch, you must pass webpack as second argument to create a cached compiler instance.
fix
Use gulpWebpack({}, webpack, callback) with the imported webpack module.
affects: *
deprecatedIn v6 and earlier, webpack4 was default; v7 requires webpack5.
fix
Update webpack to ^5.21.2 and use v7.
affects: <7.0.0
Errors
Common errors & fixes
Error: Cannot find module 'webpack'
webpack is not installed as a peer dependency.
fix
Run npm install --save-dev webpack
TypeError: webpack is not a function
Importing incorrectly (e.g., named import) or using wrong version.
fix
Use: const webpack = require('webpack-stream') or import webpack from 'webpack-stream'
Error: webpack-stream v7 requires webpack ^5.21.2
Incompatible webpack version.
fix
Upgrade webpack to ^5.21.2
Upgrade
Version history
7.0.0latest on npm
Audit
Dependencies
webpackrequiredpeer dependency required for compilation
Agent activity
9 hits · last 30 days
node
8
Resources
webpack-stream — npm install webpack-stream · libregistry