WebdriverIO service that automatically starts a Vite dev server before tests and sets the baseUrl to point to the application. Version 2.1.1 supports WebdriverIO v9 and Node.js >=18. It integrates seamlessly with Vite-based frameworks like Remix and provides options for custom config file, root directory, mode, and log level. The service is actively maintained with a release cadence of several releases per year, and it ships TypeScript definitions.
npm install wdio-vite-serviceVerified import paths — ran on the pinned version, not inferred.
Registers the vite service with custom config, then uses the baseUrl to navigate and assert in tests.
Update Node.js to version 18 or higher.
Upgrade WebdriverIO to version 9 or later.
Use ESM imports (e.g., import ViteService from 'wdio-vite-service') or use string 'vite' in services list.
Do not set baseUrl manually when using the vite service; let the service manage it.
Run `npm install wdio-vite-service --save-dev` or `pnpm add -D wdio-vite-service`
Use array syntax: services: [['vite', { configFile: './vite.config.ts' }]]Ensure the path in configFile option is correct and the file exports a valid Vite config.