TypeScript in The Build Process 9 exercises
Problem

Compiling TypeScript Files to a Directory

In our current setup, the transpiled JavaScript files are saved alongside the TypeScript files. This will get messy as our project size increases, so it would be better if we could have the generated .js files moved to their own directory.

Challenge

Your challenge is to adjust the `tsconfig.

Loading exercise

Transcript

00:00 We're now in a spot where we can run TSC watch every time we're developing and make sure that the JS files are always up to date with the TS files. But as our project grows, we're probably going to want to put the JS files inside in somewhere else, right? It would be great if we could put them inside a directory

00:19 so that they weren't just cluttering up our TypeScript files here. Your job is to work out how we can change the tsconfig.json, change something inside this configuration file in order to make this happen. What we want is we want a folder called dist, basically.

00:37 So I just imagined this folder here called dist. This is where all of our JavaScript files are going to live. Dist is kind of like distributed code, basically. And we're probably going to need to change the gitignore to just gitignore the stuff inside dist as well because we definitely don't want this committed to git.

00:55 We're also going to change the index.html to make sure we're referencing the new files. And yeah, see if you can find the tsconfig.json setting which makes this change happen. Good luck.