TypeScript · Middle · Question 43 of 75

What does paths in tsconfig.json give you?

Explanation

paths lets you write import { Button } from '@/components/button' instead of long relative paths. It's a resolution setting for the compiler - the bundler must understand the same aliases (Next.js and Vite read them from tsconfig). The file list is set by include, output by outDir.

Further reading

Problem with a question

TypeScript · Middle · question 43

Test yourself

Take the TypeScript · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz