A Cypress preprocessor for bundling JavaScript specs via webpack (v5, alpha). Integrates webpack 4.x or 5.x with Cypress's file:preprocessor hook. Requires peer dependencies: @babel/core, @babel/preset-env, babel-loader, webpack. Provides sensible defaults (Babel transpilation, development mode) but allows full customization of webpack options, watchOptions, and additionalEntries. Ships TypeScript types. Not yet stable (alpha); breaking changes may occur. Consider using @cypress/webpack-preprocessor v4 for stable releases.
npm install cypress-webpack-preprocessor-v5Verified import paths — ran on the pinned version, not inferred.
Shows typical usage: import the preprocessor, configure webpack options (with Babel preset-env), and hook into Cypress's file:preprocessor event.
Use latest stable 4.x version or pin to a specific alpha and test thoroughly.
Update webpack to version 4 or 5, or use @cypress/webpack-preprocessor 1.x if webpack 2/3 required.
Upgrade to Babel 7, or use @cypress/webpack-preprocessor <= 2.x for Babel 6 support.
Set nodeVersion: 'system' in cypress.config.js and ensure Node matches project requirements.
Set webpackOptions.devtool = false in options to disable source maps.
Use const pkg = require('@cypress/webpack-preprocessor') instead of import.npm install --save-dev @babel/core @babel/preset-env babel-loader webpack
npm install --save-dev webpack
Use const webpackPreprocessor = require('@cypress/webpack-preprocessor')Upgrade webpack to 4.x or 5.x, or downgrade to @cypress/webpack-preprocessor 1.x