cypress: TS error: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'
Current behavior:
After update to Cypress 5.1, tests breaks throwing TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'.
If I set inlineSourceMap to false, the error persist.
If I set sourceMap to false, test start working again.
Given that the default for inlineSourceMap is false, that I do not set it, and that it breaks only on newer versions, I’d say the new webpack preprocessor forces the inlineSourceMap option to true somewhere.
This is strange because it seems like you have a whole file in place to manage this scenario: https://github.com/cypress-io/cypress-webpack-preprocessor/blob/master/lib/typescript-overrides.ts
Desired behavior:
Tests should keep working without problems
Test code to reproduce
Using a tsconfig with sourceMap: true option do the trick.
Edited to add repro: https://github.com/IlCallo/cypress-test-tiny/tree/ts-sourcemap-conflict
- clone locally
yarn installyarn cypress:open- click on “spec.ts” test
- witness the error
Versions
Cypress: 5.1.0 OS: Ubuntu 18.04
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 20
- Comments: 16 (10 by maintainers)
@bahmutov Here it is: https://github.com/IlCallo/cypress-test-tiny/tree/ts-sourcemap-conflict
yarn installyarn cypress:openGiven the thumbs up to the original post, seems like I’m not the only one
@haf that’s a minimal repro, my use case have the tsconfig as suggested by the docs, but that wasn’t needed to show the broken behaviour