[Feature] Allow to provide tsconfig path
See original GitHub issueNow there is no option that would allow you to specify which tsconfig to use when running playwright tests, I would like to have this option since my project uses several tsconfig’s
npx playwright test --tsconfig mega.tsconfig.json
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:7 (3 by maintainers)
Top Results From Across the Web
paths - TSConfig Option - TypeScript
All of the common types in TypeScript ... How to provide a type shape to JavaScript objects ... How TypeScript infers types based...
Read more >How to use paths in tsconfig.json? - Stack Overflow
This can be set up on your tsconfig.json file, as it is a TS feature. You can do like this: "compilerOptions": { "baseUrl":...
Read more >tsconfig-paths - npm
The createMatchPath function will create a function that can match paths. It accepts baseUrl and paths directly as they are specified in ...
Read more >How to use the tsconfig-paths.register function in ... - Snyk
Tsconfig -paths can be used to support path mapping inside of Node. require('tsconfig-paths').register({ baseUrl: path.dirname(tsconfigPath), ...
Read more >Typescript: "paths" tsconfig - YouTube
typescript #tscHere's a thing that might help you with staying focused on features by setting a permanent "components" path in your tsconfig ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We have this issue. We’re using an NX monorepo. What we have is a setup like this:
libs/lib1/tsconfig.json libs/lib1/tsconfig.lib.json – overrides config for the library when built libs/lib1/tsconfig.spec.json – overrides config for test files libs/lib1/playwright.config.ts
libs/lib2/tsconfig.json libs/lib2/tsconfig.lib.json – overrides config for the library when built libs/lib2/tsconfig.spec.json – overrides config for test files libs/lib2/playwright.config.ts
Right now, we can’t use our tsconfig.spec.json files for playwright because it is always grabbing the tsconfig.json next to it. This is also why we ended up having a separate playwright config per lib (so that we could use our separate tsconfig.json files per project).
Ideally, we could pass in tsconfig.spec.json when we run playwright.
@pavelfeldman This is really helpful in case you need different TS-settings for your build, test and working environment. We have one TS-config for VSCode/IntelliJ, one for the build process and one for testing. For VSCode we might want to include all files in the project for TS to pick up new files. In the build process we only want to use entry points. For testing we want less strict typing rules to avoid issues with third party tools etc.
This is our app right now:
So this would be really neat.