Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blacha/tsbuildinfo
Debug long build times using tsconfig.tsbuildinfo
https://github.com/blacha/tsbuildinfo
Last synced: about 18 hours ago
JSON representation
Debug long build times using tsconfig.tsbuildinfo
- Host: GitHub
- URL: https://github.com/blacha/tsbuildinfo
- Owner: blacha
- Created: 2020-10-30T22:36:30.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-10T17:07:00.000Z (about 2 years ago)
- Last Synced: 2024-08-09T12:48:49.243Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 117 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# tsbuildinfo
Tool to debug slow build times by looking for large type definitions that may have been erroneously imported.
In some typescript projects AWS-SDK has been a very large source of typescript compile slowdowns.
by switching form a base import to directly importing the s3 client the build times for one package went from 6 seconds down to 2 seconds.```typescript
// Bad
import * as AWS from 'aws-sdk';// Good
import s3 from 'aws-sdk/clients/s3';
```## Usage
```
tsbuildinfo
```### Example
Here is a repository that has a base import `import * as AWS from 'aws-sdk'`
```
tsbuildinfo ~/basemaps/packages/linzjs-s3fs/tsconfig.tsbuildinfoProcessing /home/blacha/workspace/basemaps/packages/linzjs-s3fs/tsconfig.tsbuildinfo
Largest Imported Modules:
23.73 MB aws-sdk
1.13 MB typescript
684.81 KB @types/node
81.97 KB @types/sinon
71.46 KB @types/aws-lambdaImport Paths:
./src/__tests__/file.s3.test.ts => aws-sdk
./src/file.s3.ts => aws-sdk
./src/index.ts => aws-sdk
./src/file.local.ts => @types/node
./src/file.s3.ts => @types/node
./src/file.ts => @types/node
./src/index.ts => @types/node
./src/__tests__/file.s3.test.ts => @types/sinon
```After switching to `import s3 from 'aws-sdk/clients/s3';`
```
Processing /home/blacha/workspace/basemaps/packages/linzjs-s3fs/tsconfig.tsbuildinfoLargest Imported Modules:
1.13 MB typescript
684.81 KB @types/node
581.09 KB aws-sdk
81.97 KB @types/sinon
71.46 KB @types/aws-lambdaImport Paths:
./src/file.local.ts => @types/node
./src/file.s3.ts => @types/node
./src/file.ts => @types/node
./src/index.ts => @types/node
./src/__tests__/file.s3.test.ts => aws-sdk
./src/file.s3.ts => aws-sdk
./src/index.ts => aws-sdk
./src/__tests__/file.s3.test.ts => @types/sinon
```