{"id":26637,"library":"wdio-webpack-service","title":"WDIO Webpack Service","description":"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.","status":"deprecated","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/leadpages/wdio-webpack-service","tags":["javascript","webdriverio","wdio","wdio-service","webpack","tests","assets"],"install":[{"cmd":"npm install wdio-webpack-service","lang":"bash","label":"npm"},{"cmd":"yarn add wdio-webpack-service","lang":"bash","label":"yarn"},{"cmd":"pnpm add wdio-webpack-service","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for building bundles","package":"webpack","optional":false}],"imports":[{"note":"This is a WebdriverIO service, not a module import. Configure via the services array in wdio.conf.js.","wrong":"import { WebpackService } from 'wdio-webpack-service'","symbol":"services: ['webpack']","correct":"services: ['webpack'] // in wdio.conf.js"},{"note":"Pass options as an array element in the services list, not via constructor.","wrong":"new WebpackService({ webpackConfig: {...} })","symbol":"webpackConfig","correct":"// In wdio.conf.js: services: [['webpack', { webpackConfig: { /* ... */ } }]]"},{"note":"Options must be within the service's array configuration, not at the config root.","wrong":"services: ['webpack'], webpackDriverConfig: {...}","symbol":"webpackDriverConfig","correct":"services: [['webpack', { webpackDriverConfig: { output: { path: './dist' } } }]]"}],"quickstart":{"code":"// wdio.conf.js\nconst path = require('path');\n\nexports.config = {\n  // ...\n  services: [\n    ['webpack', {\n      webpackConfig: {\n        entry: path.resolve(__dirname, 'src/index.js'),\n        output: {\n          path: path.resolve(__dirname, 'dist'),\n          filename: 'bundle.js'\n        },\n        resolve: {\n          extensions: ['.js']\n        }\n      },\n      webpackDriverConfig: {\n        output: {\n          path: path.resolve(__dirname, 'test/assets')\n        }\n      },\n      webpackLog: true\n    }]\n  ],\n  // ...\n};\n","lang":"javascript","description":"Shows how to configure the webpack service in wdio.conf.js, specifying webpack config, driver overrides, and logging."},"warnings":[{"fix":"Consider alternatives like wdio-static-server-service or custom onPrepare hook.","message":"Package is no longer maintained and only supports webpack 1.x.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Do not use with webpack 2+; use an alternative service.","message":"webpack 1.x peer dependency is outdated and incompatible with modern webpack projects.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use the correct array format shown in the documentation.","message":"Options must be passed as a nested array: services: [['webpack', { ... }]]","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install webpack@1 --save-dev","cause":"webpack is not installed as a peer dependency (required webpack 1.x).","error":"Error: Cannot find module 'webpack'"},{"fix":"Downgrade to webpack 1.x or use a different service.","cause":"Webpack 2+ is installed and incompatible with this package's require pattern.","error":"TypeError: webpack is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}