-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
When we use on('file:preprocessor', require('@cypress/code-coverage/use-babelrc')) in the plugin/index.js file the source maps stop working. The source maps only show up if we have console.log in the tests.
Inside use-babelrc, we can see that browserify.defaultOptions has debug as undefined, so setting
const browserify = require('@cypress/browserify-preprocessor')
const options = browserify.defaultOptions
options.browserifyOptions.transform[1][1].babelrc = true
//adding the below line shows source map or else source map comes up only if console.log is added to a test file
options.browserifyOptions.debug = true
module.exports = browserify(options)
Related issue: cypress-io/cypress-browserify-preprocessor#88
Note: not using use-babelrc or not preprocessing i.e. not having the below line in plugin/index.js will show sourcemaps, enabling this line without adding .debug=true disables sourcemap
on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'))
Metadata
Metadata
Assignees
Labels
No labels