Registry / testing / wdio-webpack-service

wdio-webpack-service

JSON →
library1.0.1jsnpmunverified

WebdriverIO service that builds webpack bundles before running tests. Current stable version is 1.0.1, with webpack 1.x as a peer dependency. Allows bundling static assets via webpack and provides options for custom webpack configuration, driver-specific overrides, and logging. Designed for WebdriverIO v4 and earlier; does not support modern WebdriverIO or webpack versions.

npm install wdio-webpack-service
INSTALL
IMPORT
SIG · WDIO-WEBPACK-SERVI
W
wdio-webpack-service
testingjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

services: ['webpack']
services: ['webpack'] // in wdio.conf.js
import { WebpackService } from 'wdio-webpack-service'
This is a WebdriverIO service, not a module import. Configure via the services array in wdio.conf.js.
webpackConfig
// In wdio.conf.js: services: [['webpack', { webpackConfig: { /* ... */ } }]]
new WebpackService({ webpackConfig: {...} })
Pass options as an array element in the services list, not via constructor.
webpackDriverConfig
services: [['webpack', { webpackDriverConfig: { output: { path: './dist' } } }]]
services: ['webpack'], webpackDriverConfig: {...}
Options must be within the service's array configuration, not at the config root.

Shows how to configure the webpack service in wdio.conf.js, specifying webpack config, driver overrides, and logging.

// wdio.conf.js const path = require('path'); exports.config = { // ... services: [ ['webpack', { webpackConfig: { entry: path.resolve(__dirname, 'src/index.js'), output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js' }, resolve: { extensions: ['.js'] } }, webpackDriverConfig: { output: { path: path.resolve(__dirname, 'test/assets') } }, webpackLog: true }] ], // ... };
Debug
Known issues
deprecatedPackage is no longer maintained and only supports webpack 1.x.
fix
Consider alternatives like wdio-static-server-service or custom onPrepare hook.
affects: >=1.0.0
gotchawebpack 1.x peer dependency is outdated and incompatible with modern webpack projects.
fix
Do not use with webpack 2+; use an alternative service.
affects: >=1.0.0
gotchaOptions must be passed as a nested array: services: [['webpack', { ... }]]
fix
Use the correct array format shown in the documentation.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'webpack'
webpack is not installed as a peer dependency (required webpack 1.x).
fix
npm install webpack@1 --save-dev
TypeError: webpack is not a function
Webpack 2+ is installed and incompatible with this package's require pattern.
fix
Downgrade to webpack 1.x or use a different service.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
webpackrequiredPeer dependency for building bundles
Agent activity
14 hits · last 30 days
node
12
Resources
wdio-webpack-service — npm install wdio-webpack-service · libregistry