Registry / testing / cypress-esbuild-preprocessor

cypress-esbuild-preprocessor

JSON →
library1.0.2jsnpmunverified

A Cypress preprocessor that uses esbuild to bundle test specs, offering roughly 50x faster performance compared to Webpack/Babel/TypeScript-based alternatives. Current stable version is 1.0.2, with a low release cadence focused on bug fixes and compatibility. Key differentiators: zero-config TypeScript support via tsconfig, path alias resolution, and minimal overhead. Requires esbuild as a peer dependency. Suited for teams looking to speed up Cypress test execution in CI or local development.

npm install cypress-esbuild-preprocessor
INSTALL
IMPORT
SIG · CYPRESS-ESBUILD-PR
C
cypress-esbuild-preprocessor
testingjavascriptv1.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

cypressEsbuildPreprocessor
import { cypressEsbuildPreprocessor } from 'cypress-esbuild-preprocessor'
const cypressEsbuildPreprocessor = require('cypress-esbuild-preprocessor').default
CommonJS require works without .default; ESM named export is preferred.
cypressEsbuildPreprocessor
const { cypressEsbuildPreprocessor } = require('cypress-esbuild-preprocessor')
const cypressEsbuildPreprocessor = require('cypress-esbuild-preprocessor')
The module exports a named function, not a default. Do not call it as a default import.
options
cypressEsbuildPreprocessor({ esbuildOptions: { tsconfig: './tsconfig.json' } })
cypressEsbuildPreprocessor({ tsconfig: './tsconfig.json' })
The tsconfig path must be nested under the 'esbuildOptions' key, not at the top level.

Shows how to configure the preprocessor in Cypress plugins file with TypeScript and tsconfig path resolution.

// cypress/plugins/index.ts import { cypressEsbuildPreprocessor } from 'cypress-esbuild-preprocessor'; import path from 'path'; module.exports = (on, config) => { on( 'file:preprocessor', cypressEsbuildPreprocessor({ esbuildOptions: { tsconfig: path.resolve(__dirname, '../tsconfig.json'), }, }) ); };
Debug
Known issues
gotchaThe module exports a named function, not a default. Using default import will result in undefined or runtime error.
fix
Use named import: import { cypressEsbuildPreprocessor } from 'cypress-esbuild-preprocessor'
affects: >=1.0.0
gotchaThe esbuildOptions object must contain tsconfig path at the correct nested level. Placing tsconfig directly in the top-level options will be ignored.
fix
Pass options as { esbuildOptions: { tsconfig: './tsconfig.json' } }
affects: >=1.0.0
deprecatedThe plugin file should be placed in cypress/plugins/index.js or .ts, not in support or integration folders.
fix
Move configuration to cypress/plugins/index file.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'cypress-esbuild-preprocessor'
Missing dependency or incorrect import path.
fix
Run npm install -D esbuild cypress-esbuild-preprocessor
TypeError: cypressEsbuildPreprocessor is not a function
Default import instead of named import.
fix
Change to import { cypressEsbuildPreprocessor } from 'cypress-esbuild-preprocessor'
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
esbuildrequiredPeer dependency for bundling specs
Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
cypress-esbuild-preprocessor — npm install cypress-esbuild-preprocessor · libregistry