Setup

npx create-next-app

npm init next-app nextjs-blog --example "https://github.com/vercel/next-learn-starter/tree/master/learn-starter"

Usage

yarn dev

Absolute Path Imports

TS

"compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "conf": ["conf/*"],
      "src": ["src/*"],
      "styles": ["styles/*"]
    },
    ...

JS

Jsconfig.json

{
  "compilerOptions": {
    "paths": {
      "src": ["src"]
    }
  }
}

Last updated