Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsconfigs, simple or composite #18

Open
AlexAegis opened this issue Jul 8, 2023 · 0 comments
Open

tsconfigs, simple or composite #18

AlexAegis opened this issue Jul 8, 2023 · 0 comments

Comments

@AlexAegis
Copy link
Owner

Simple, single file tsconfigs work okay now.

The main purpose of a composite setup would be to overlay two ts compilation scopes over eachother. One for the actual source code and the other for tests. The test ones can include some extra globals, and the source code can compile itself without the tests.

But when you don't use tsc for compilation this doesn't matter anymore. And vitest is perfecly fine to use with explicit imports instead of global describe, it etc functions.

The only downside is that vite-plugin-dts will use the scope defined in tsconfig, and that includes everything, meaning you will also export types for all the tests. Which won't be used and is unnecessary to compile.

But does this worth having a much more complicated tsconfig setup? Is there any more benefit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant