
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@cypress/browserify-preprocessor
Advanced tools
Cypress preprocessor for bundling JavaScript via browserify
Cypress preprocessor for bundling JavaScript via browserify.
Modifying the default options allows you to add support for things like:
Requires Node version 6.5.0 or above.
npm install --save-dev @cypress/browserify-preprocessor
In your project's plugins file:
const browserify = require('@cypress/browserify-preprocessor')
module.exports = (on) => {
on('file:preprocessor', browserify())
}
Pass in options as the second argument to browserify:
module.exports = (on) => {
const options = {
// options here
}
on('file:preprocessor', browserify(options))
}
Object of options passed to browserify.
// example
browserify({
browserifyOptions: {
extensions: ['.js', '.ts'],
plugin: [
['tsify']
]
}
})
If you pass one of the top-level options in (extensions, transform, etc), it will override the default. In the above example, browserify will process .js and .ts files, but not .jsx or .coffee. If you wish to add to or modify existing options, read about modifying the default options.
watchify is automatically configured as a plugin (as needed), so it's not necessary to manually specify it.
Source maps are always enabled unless explicitly disabled by specifying debug: false.
Default:
{
extensions: ['.js', '.jsx', '.coffee'],
transform: [
[
'coffeeify',
{}
],
[
'babelify',
{
ast: false,
babelrc: false,
plugins: [
'@babel/plugin-transform-modules-commonjs',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-runtime',
],
presets: [
'@babel/preset-env',
'@babel/preset-react',
]
},
]
],
debug: true,
plugin: [],
cache: {},
packageCache: {}
}
Note: cache and packageCache are always set to {} and cannot be overridden. Otherwise, file watching would not function correctly.
Object of options passed to watchify
// example
browserify({
watchifyOptions: {
delay: 500
}
})
Default:
{
ignoreWatch: [
'**/.git/**',
'**/.nyc_output/**',
'**/.sass-cache/**',
'**/bower_components/**',
'**/coverage/**',
'**/node_modules/**'
],
}
A function that is called with the browserify instance. This allows you to specify external files and plugins. See the browserify docs for methods available.
// example
browserify({
onBundle (bundle) {
bundle.external('react')
bundle.plugin('some-plugin')
bundle.ignore('pg-native')
}
})
When the path to the TypeScript package is given, Cypress will automatically transpile .ts spec, plugin, support files. Note that this DOES NOT check types.
browserify({
typescript: require.resolve('typescript')
})
Default: undefined
The default options are provided as browserify.defaultOptions so they can be more easily modified.
If, for example, you want to update the options for the babelify transform to turn on babelrc loading, you could do the following:
const browserify = require('@cypress/browserify-preprocessor')
module.exports = (on) => {
const options = browserify.defaultOptions
options.browserifyOptions.transform[1][1].babelrc = true
on('file:preprocessor', browserify(options))
}
Execute code with DEBUG=cypress:browserify environment variable.
Run all tests once:
npm test
Run tests in watch mode:
npm run test-watch
This project is licensed under the terms of the MIT license.
The `cypress-rollup-preprocessor` package enables you to use Rollup to bundle your Cypress test files. Like `@cypress/browserify-preprocessor`, it allows for custom transformations and plugins, but it uses Rollup as the bundler. Rollup is known for its efficient tree-shaking capabilities, which can result in smaller bundle sizes.
The `cypress-esbuild-preprocessor` package allows you to use esbuild to bundle your Cypress test files. Esbuild is known for its speed and efficiency, making it a good alternative to Browserify for faster build times. This package provides similar functionality but leverages the performance benefits of esbuild.
FAQs
Cypress preprocessor for bundling JavaScript via browserify
We found that @cypress/browserify-preprocessor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.