
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@cldcvr/cypress-esbuild-preprocessor
Advanced tools
Bundle Cypress specs using esbuild
npm i -D cypress @bahmutov/cypress-esbuild-preprocessor esbuild
# note: this plugin assumes the esbuild is peer dependency
In your plugin file use this module as the preprocessor
// cypress/plugins/index.js
const createBundler = require('@bahmutov/cypress-esbuild-preprocessor')
module.exports = (on, config) => {
on('file:preprocessor', createBundler())
}
If you want to pass your own ESBuild options
// cypress/plugins/index.js
const createBundler = require('@bahmutov/cypress-esbuild-preprocessor')
module.exports = (on, config) => {
const bundler = createBundler({
// any ESBuild options here
// https://esbuild.github.io/api/
})
on('file:preprocessor', bundler)
}
Run with the environment variable DEBUG=cypress-esbuild-preprocessor
But also if something is not working, check out the alternative package: cypress-esbuild-preprocessor
// v1
const bundler = require('cypress-esbuild-preprocessor')
module.exports = (on, config) => {
on('file:preprocessor', bundler)
}
// v2
const createBundler = require('cypress-esbuild-preprocessor')
module.exports = (on, config) => {
// pass ESBuild options to be applied to each spec file
const bundler = createBundler({
define: {
'process.env.NODE_ENV': '"development"',
},
})
on('file:preprocessor', bundler)
}
Author: Gleb Bahmutov <gleb.bahmutov@gmail.com> © 2022
License: MIT - do anything with the code, but don't blame me if it does not work.
Support: if you find any problems with this module, email / tweet / open issue on Github
FAQs
Bundle Cypress specs using esbuild
We found that @cldcvr/cypress-esbuild-preprocessor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.