question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Allow to provide tsconfig path

See original GitHub issue

Now 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:open
  • Created 2 years ago
  • Reactions:6
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
bellindjcommented, Jun 6, 2022

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.

1reaction
JonWallstencommented, Jul 4, 2022

@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: image

So this would be really neat.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found