Current behavior
In #23161 we were allowed to pass in an Angular config object, which also includes a tsconfig-path. However, that tsconfig path seems to be fully ignored; if I pass in a random string, everything builds/tests as it should. I dug a bit through the code and looking at e.g
|
const tsConfigContent = JSON.stringify({ |
, it always uses /tsconfig.json.
Desired behavior
In my Angular / NX apps I have:
- tsconfig.json (baseline)
- tsconfig.app.json
- tsconfig.jest.json
- tsconfig.editor.json
I would also like to have a tsconfig.cypress.json to ensure the correct paths etc are used without having to interfere with the rest of my tsconfig-setup.
Test code to reproduce
// cypress.config.ts
export default defineConfig({
component: {
video: true,
videosFolder: root + 'dist/cypress/components/videos',
screenshotsFolder: root + 'dist/cypress/components/screenshots',
devServer: {
framework: 'angular',
bundler: 'webpack',
options: { // temporary, this will be done automatically when we get it directly from nx
projectConfig: {
root: projectRoot,
sourceRoot: projectRoot + 'src',
buildOptions: {
tsConfig: _projectRoot + 'tsconfig.app.json',
... more config (that works yay)
},
}
}
},
specPattern: 'cypress/specs/**/*.cy.ts',
},
});
Cypress Version
10.7.0
Node version
v18.4.0 (also tried with 16.2.0)
Operating System
macOS 12.5
Debug Logs
No response
Other
No response
Current behavior
In #23161 we were allowed to pass in an Angular config object, which also includes a tsconfig-path. However, that tsconfig path seems to be fully ignored; if I pass in a random string, everything builds/tests as it should. I dug a bit through the code and looking at e.g
cypress/npm/webpack-dev-server/src/helpers/angularHandler.ts
Line 135 in a9d9711
Desired behavior
In my Angular / NX apps I have:
I would also like to have a tsconfig.cypress.json to ensure the correct paths etc are used without having to interfere with the rest of my tsconfig-setup.
Test code to reproduce
Cypress Version
10.7.0
Node version
v18.4.0 (also tried with 16.2.0)
Operating System
macOS 12.5
Debug Logs
No response
Other
No response