@@ -206,11 +206,27 @@ inline source maps, you will not see code frames.
206
206
By default, Cypress will include an inline source map in your spec file, so you
207
207
will get the most out of the error experience. If you
208
208
[ modify the preprocessor] ( /api/node-events/preprocessors-api ) , ensure that inline
209
- source maps are enabled to get the same experience. With webpack and the
210
- [ webpack preprocessor] ( https://github.com/cypress-io/cypress/tree/develop/npm/webpack-preprocessor ) ,
211
- for example, set
212
- [ the ` devtool ` option] ( https://webpack.js.org/configuration/devtool/ ) to
213
- ` inline-source-map ` .
209
+ source maps are enabled to get the same experience. Some examples of this include:
210
+
211
+ - With webpack and the
212
+ [ webpack preprocessor] ( https://github.com/cypress-io/cypress/tree/develop/npm/webpack-preprocessor ) , set
213
+ [ the ` devtool ` option] ( https://webpack.js.org/configuration/devtool/ ) to
214
+ ` inline-source-map ` .
215
+ - With esbuild and the
216
+ [ esbuild preprocessor] ( https://github.com/bahmutov/cypress-esbuild-preprocessor/tree/main ) , set
217
+ [ the ` sourcemap ` option] ( https://esbuild.github.io/api/#sourcemap ) to ` inline ` when
218
+ [ creating the bundler] ( https://github.com/bahmutov/cypress-esbuild-preprocessor#esbuild-options ) .
219
+ - With cucumber and the
220
+ [ cucumber preprocessor] ( https://github.com/badeball/cypress-cucumber-preprocessor/tree/master )
221
+ third party bundlers are used to bundle the code.
222
+ - For esbuild and the
223
+ [ esbuild preprocessor] ( https://github.com/bahmutov/cypress-esbuild-preprocessor/tree/main ) ,
224
+ set [ the ` sourcemap ` option] ( https://esbuild.github.io/api/#sourcemap ) to ` inline ` when
225
+ [ creating the bundler] ( https://github.com/bahmutov/cypress-esbuild-preprocessor#esbuild-options ) .
226
+ Note: the cucumber preprocessor documentation for the esbuild bundler describes an experimental
227
+ option: ` prettySourceMaps ` , but this option is buggy and setting source maps on the esbuild
228
+ bundler directly works better.
229
+ - The other bundlers all default their source maps appropriately.
214
230
215
231
## Debugging flake
216
232
0 commit comments