simplify types generation using a single tsconfig #2118
Merged
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.
Changes
This is a follow-up to #2100 and precursor to #2119.
The
"module"
has been changed to"NodeNext"
because newer TS versions require it if also using"moduleResolution": "NodeNext"
(see 5.2 release notes).The
tsconfig.esm
,tsconfig.cjs
andtsconfig.react-table
files have all been removed. A singletsconfig.build
is used for generating all types.tsconfig.esm
andtsconfig.cjs
are not necessary because the actual JS output is generated byswc
. The types have always been identical between esm and cjs, so a single config can be used, with--outDir
passed inline through CLI args.tsconfig.react-table
was only used to generate a top-levelreact-table.d.ts
file (see original comment and related recent PR for more context). This file has now been removed, and the fallback strategy is now implemented usingtypesVersions
, based on this SO answer and this repo.Testing
Build passing, and verified that the build output looks fine.
Manually verified that vite-playground errors out using
"moduleResolution": "Node"
only when the"typesVersions"
is not present in@itwin/itwinui-react/package.json
.Docs
Added changesets.