In 0b1b54c67a5b5f53841c26706e298b74999cb421 we removed @cypress/webpack-preprocessor in favour of native Typescript support introduced in Cypress v4.4.0.
Previously, the webpack config used by the preprocessor included:
Unfortunately it turns out that Cypress currently ignores the user-supplied tsconfig.json file, so any compiler options specified aren't actually used when building & running the tests.
Hopefully this will change with a future release of Cypress.
For now, the workaround was to change all imports to be relative to the current file, e.g.
// cypress/integration/test.ts
import { foo } from "../support/utils";
In 0b1b54c67a5b5f53841c26706e298b74999cb421 we removed
@cypress/webpack-preprocessor
in favour of native Typescript support introduced in Cypress v4.4.0.Previously, the webpack config used by the preprocessor included:
...to allow test files in
/cypress/integration/*
to resolve import specifiers relative to the/cypress/support/*
directory, e.g.The hope was that the existing config in
cypress/tsconfig.json
(already there for VS Code to resolve these paths) would achieve the same result:Unfortunately it turns out that Cypress currently ignores the user-supplied
tsconfig.json
file, so any compiler options specified aren't actually used when building & running the tests.Hopefully this will change with a future release of Cypress.
For now, the workaround was to change all imports to be relative to the current file, e.g.
https://github.com/cypress-io/cypress/issues/7188