Adding absolute imports to Next.js app

InstructorTomasz Łakomy

Share this video with your friends

Send Tweet

This is a small DX improvement: instead of writing ../../../../../components over and over again in our code, we'd like to have a consistent way of importing components directory using @components no matter which directory we're currently at.

In this quick lesson we're going to learn how to add absolute imports to a Next.js app.