{"id":20838,"library":"webpack-stream","title":"webpack-stream","description":"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.","status":"active","version":"7.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/shama/webpack-stream","tags":["javascript","gulpplugin","webpack","stream"],"install":[{"cmd":"npm install webpack-stream","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-stream","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-stream","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for compilation","package":"webpack","optional":false}],"imports":[{"note":"ESM is available; CommonJS also works with require.","wrong":"const webpack = require('webpack-stream')","symbol":"default export","correct":"import webpack from 'webpack-stream'"},{"note":"CommonJS require is commonly used in gulpfile.js.","symbol":"require","correct":"const webpack = require('webpack-stream')"},{"note":"Package only has default export; no named exports.","symbol":"named export (none)"}],"quickstart":{"code":"const gulp = require('gulp');\nconst webpack = require('webpack-stream');\nconst webpackConfig = require('./webpack.config.js');\n\ngulp.task('default', () => {\n  return gulp.src('src/entry.js')\n    .pipe(webpack(webpackConfig))\n    .pipe(gulp.dest('dist/'));\n});","lang":"javascript","description":"Basic usage: compile src/entry.js with webpack using an external config and output to dist/."},"warnings":[{"fix":"Upgrade to webpack ^5.21.2 and Node >= 10.","message":"v7.0.0 dropped support for webpack < 5 and Node < 10.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Use gulp.watch or webpack's watch, not both.","message":"Do not mix gulp.watch with webpack's watch option; they are mutually exclusive.","severity":"gotcha","affected_versions":"*"},{"fix":"Use gulpWebpack({}, webpack, callback) with the imported webpack module.","message":"When using gulp.watch, you must pass webpack as second argument to create a cached compiler instance.","severity":"gotcha","affected_versions":"*"},{"fix":"Update webpack to ^5.21.2 and use v7.","message":"In v6 and earlier, webpack4 was default; v7 requires webpack5.","severity":"deprecated","affected_versions":"<7.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev webpack","cause":"webpack is not installed as a peer dependency.","error":"Error: Cannot find module 'webpack'"},{"fix":"Use: const webpack = require('webpack-stream') or import webpack from 'webpack-stream'","cause":"Importing incorrectly (e.g., named import) or using wrong version.","error":"TypeError: webpack is not a function"},{"fix":"Upgrade webpack to ^5.21.2","cause":"Incompatible webpack version.","error":"Error: webpack-stream v7 requires webpack ^5.21.2"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}