npm.io
2.0.7 • Published 2 weeks ago

@tsconfig/next

Licence
MIT
Version
2.0.7
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
7.9K

A base TSConfig for working with Next.js.

Add the package to your "devDependencies":

npm install --save-dev @tsconfig/next
yarn add --dev @tsconfig/next

Add to your tsconfig.json:

"extends": "@tsconfig/next/tsconfig.json"

The tsconfig.json:

{
  "$schema": "https://www.schemastore.org/tsconfig",
  "_version": "2.0.0",

  "compilerOptions": {
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "plugins": [
      {
        "name": "next"
      }
    ]
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
  "exclude": ["node_modules"]
}

You can find the code here.

Keywords