@procore/typescript-config
v1.0.0
Published
Procore Typescript Configs
Downloads
54
Maintainers
Keywords
Readme
@procore/typescript-config
Procore Technologies, Inc typescript
configurations
We currently have
app.json
which is a recreation of core-scripts last typescript configlib.json
which is a recreation of core-scripts last typescript lib configvite.lib.json
a tsconfig for library / shared functions to be used with vitevite.react.lib.json
a tsconfig for library / shared react components to be used with vite
Installation
Yarn
yarn add -DE typescript @procore/typescript-config
Usage
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.json
under 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/*"]
}
}
}