2.0.0 • Published 1 year ago
@procore/typescript-config v2.0.0
@procore/typescript-config
Procore Technologies, Inc typescript configurations
We currently have
app.jsonwhich is a recreation of core-scripts last typescript configlib.jsonwhich is a recreation of core-scripts last typescript lib configvite.lib.jsona tsconfig for library / shared functions to be used with vitevite.react.lib.jsona tsconfig for library / shared react components to be used with vite
Installation
Yarn
yarn add -DE typescript @procore/typescript-configUsage
Create or add to your tsconfig.json
// tsconfig.json
{
"extends": "@procore/typescript-config/vite.lib.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "dist"
}
}Breaking changes from core-scripts
Please provide your own rootDir/outDir as shown above, this is a limitation of sharable typescript configs, will revisit in the future
If you are proxying / shortcutting your files with the
@shorthand for a specific directory, please re-add that with the following in yourtsconfig.jsonunder compiler options. Do note that this breaks some IDE's abilities to successfully detect export renames, and is thus discouraged
Full library component tsconfig recreation:
// tsconfig.json
{
"extends": "@procore/typescript-config/lib.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "dist"
"paths": {
"@/*": ["src/*"]
}
}
}