Opinionated TS transpilation without overrides is problematic #7575
Cypress recently added better native support for TypeScript, a great step forward, thanks!
However, part of this process added the following defaults for
import * as Foo from 'foo';
or you can enable
import Foo from 'foo';
In my case, I chose the former, to reduce the "magic" that is done by the TypeScript compiler; however, because Cypress enforces the latter, I get lots of errors along the lines of
A test frameworks authors should not enforce an opinion about how I build my application; this
Test code to reproduce
Working on a minimal reproduction, please give me a bit of time 😄
The text was updated successfully, but these errors were encountered:
I did move it, but this option was already there https://github.com/cypress-io/cypress/pull/7197/files#diff-0f01b0186fbd767d98bd689a60ddd05aL193
I do wonder if we really need it or not, and if we should overwrite it from the user's TS config
I feel quite strongly that enforcing this is a mistake on Cypress' part, though I can see why it was done. Haven't quite had time yet to put up a minimal repro, though it seems that my intent is at least understandable without it, for now.
Is this something I should put up a PR for? I don't know how accessible this is a Cypress newcomer, though I can see you've got a lot going on 😅 and I'm happy to give it a go.
It was mainly because I misunderstood the default behavior of tsnode. I thought it would load tsconfig.json from Cypress internal ones. But I was wrong.
Maybe I was more familiar with
But removing it would break some test setups with no