cypress-esbuild-preprocessor
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

cypress-esbuild-preprocessor

Uses https://github.com/evanw/esbuild to bundle your specs. Around 50x faster than a webpack + babel/typescript based preprocessor.

Usage

Install via

npm install -D esbuild cypress-esbuild-preprocessor

Use in your cypress/plugins/index.js

const {cypressEsbuildPreprocessor} = require('cypress-esbuild-preprocessor');
const path = require('path');
 
module.exports = (on, config) => {
    on(
        'file:preprocessor',
        cypressEsbuildPreprocessor({
            esbuildOptions: {
                // optional tsconfig for typescript support and path mapping (see https://github.com/evanw/esbuild for all options)
                tsconfig: path.resolve(__dirname, '../../tsconfig.json'),
            },
        }),
    );
};

Package Sidebar

Install

npm i cypress-esbuild-preprocessor

Weekly Downloads

12,914

Version

1.0.2

License

ISC

Unpacked Size

6.68 kB

Total Files

5

Last publish

Collaborators

  • sod