Logic related to scaffolding new projects using launchpad, including detecting component frameworks and bundlers, installing dependencies and creating cypress.config.js files.
We have integrations for popular code generators like Next.js and Vue CLI, and ship a cypress.config.js that will work out of the box for those templates.
We will also attempt to scaffold a configuration file for projects using React and Vue projects using Vite and Webpack that are not necessarily created using a code generator.
| Name | Version | Dev Server | Version | Library | Component Adaptor | Example Project |
|---|---|---|---|---|---|---|
| React | - | Vite | 5, 6, 7 | React 18, 19 | @cypress/react@latest |
Link |
| React | - | Webpack | 5 | React 18, 19 | @cypress/vue@latest |
Link |
| Vue | - | Vite | 5, 6, 7 | Vue 3 | @cypress/react@latest |
Link |
| Vue | - | Webpack | 5 | Vue 3 | @cypress/vue@latest |
Link |
| Angular | - | Webpack | 5 | Angular 18, 19, 20, 21 | @cypress/angular@latest |
Link |
| Svelte | - | Vite | 5, 6, 7 | Svelte 5 | @cypress/svelte@latest |
Link |
| Svelte | - | Webpack | 5 | Svelte 5 | @cypress/svelte@latest |
Link |
| Next.js | 14, 15, 16 | Webpack | 5 | React 18, 19 | @cypress/react@latest |
Link |
The process for adding a new library/framework/bundler is as follows:
- Add your framework in
src/frameworks.ts. - Any new dependencies are declared in
src/constants.ts. Don't forget to add a description. - Ensure your project has the correct library and bundler detected with a test in
test/unit/detect.spec.ts. - Add a new project with the correct
cypress.config.jsandpackage.jsonto system-tests/projects. It should be<name>-configured, which is a working example with some specs. Ensure it will run on CI by adding it tocomponent_testing_spec.ts. - Add another project called
<name>-unconfigured, which represents the project prior to having Cypress added. This will be used in step 5. - Add a test to
scaffold-component-testing.cy.tsto ensure your project has the correctcypress.config.jsgenerated. Use an existing test as a template.
@packages/scaffold-config/browser/dependencies is NOT used in the production binary and therefore doesn't need to be included when the package bundles.
We also build an ESM version of @packages/scaffold-config but it isn't currently in use as this packages is only used in server-side CommonJS currently.