Skip to content

TS error: Option 'sourceMap' cannot be specified with option 'inlineSourceMap' #8477

@IlCallo

Description

@IlCallo

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 install
  • yarn cypress:open
  • click on "spec.ts" test
  • witness the error

Versions

Cypress: 5.1.0
OS: Ubuntu 18.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions