Re:Starting a TypeScript Project in 2021
by dboreham on Wednesday April 21, 2021 @08:09PM
(#26897025)
What mystery meat is in that tsconfig.json though?
Re:Starting a TypeScript Project in 2021
by PetahNZ on Wednesday April 21, 2021 @07:22PM
(#26896625)
tsc doesn't bundle, or resolve imports, or transpile for cross browser though, does it?
Re:Starting a TypeScript Project in 2021
by TechSupportJosh on Wednesday April 21, 2021 @07:28PM
(#26896677)
Using something like Parcel means it's usually as easy as adding parcel serve or parcel build to package.json and it handles the transpile, module resolution, bundling, tree shaking and hot reload for development.
> npm init > npm i --save-dev typescript
Add "build":"tsc" to your package.json "scripts" Add a tsconfig.json file
> npm run build
Finito - you've compiled a TS project to JS