Repository navigation
fix: make the generated tsconfig.json cover the generated files - #184
Merged
Merged
Conversation
The generated tsconfig.json only included `./src`, which a new project does not have, so the Playwright config and tests were not part of any TypeScript project. With TypeScript 6 defaulting `types` to `[]`, editors then report `Cannot find name 'process'` in playwright.config.ts. Include the test directory and playwright.config.ts, drop the leftover component testing `jsx` option, and leave an existing tsconfig.json untouched instead of overwriting it (or failing in --quiet mode). Fixes microsoft/playwright#43097
Yury Semikhatsky (yury-s)
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes microsoft/playwright#43097
The
tsconfig.jsonadded in #176 only included./src, which a new project does not have (tsc -p .fails with "No inputs were found"). Soplaywright.config.tsand the tests were not part of any TypeScript project, and since TypeScript 6 defaultstypesto[], editors reportCannot find name 'process'in the generated config.playwright.config.ts, and use the compiler options suggested in the issue; drop thejsxoption left over from component testingtsconfig.jsonwhen the project does not have one. Before, an existing one was silently overwritten, and--quietexited with "These files already exist"tsc(fortestsande2etest dirs) and that keep an existingtsconfig.json