You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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. Andvitest
is perfecly fine to use with explicit imports instead of globaldescribe
,it
etc functions.The only downside is that
vite-plugin-dts
will use the scope defined intsconfig
, 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?
The text was updated successfully, but these errors were encountered: