These are the only official examples at the time of writing. Any other example you come across is not official and might be severely outdated by now.
If you're using the preprocessor with other plugins, please read docs/event-handlers.md: On event handlers carefully.
The examples illustrates using each bundler in each language flavor.
CJS | ESM | TS | |
---|---|---|---|
Browserify | Link | Link | Link |
Esbuild | Link | Link | Link |
Webpack | Link | Link | Link |
Component testing works with both Webpack and Vite1 as a bundler.
CJS | ESM | TS | |
---|---|---|---|
React + Webpack | Link | ||
React + Vite | Link |
Footnotes
-
Using Vite requires patching
@cypress/vite-dev-server
, something which is easily achieved usingpatch-package
as the example illustrates. ↩