@tsconfig/nuxt

A base TSConfig for working with Nuxt.

Usage no npm install needed!

<script type="module">
  import tsconfigNuxt from 'https://cdn.skypack.dev/@tsconfig/nuxt';
</script>

README

A base TSConfig for working with Nuxt.

Add the package to your "devDependencies":

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

Add to your tsconfig.json:

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

The tsconfig.json:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "display": "Nuxt",

  "compilerOptions": {
    "target": "ES2018",
    "module": "ESNext",
    "moduleResolution": "Node",
    "lib": [
      "ESNext",
      "ESNext.AsyncIterable",
      "DOM"
    ],
    "esModuleInterop": true,
    "allowJs": true,
    "sourceMap": true,
    "strict": true,
    "noEmit": true,
    "baseUrl": ".",
    "paths": {
      "~/*": [
        "./*"
      ],
      "@/*": [
        "./*"
      ]
    },
    "types": [
      "@types/node",
      "@nuxt/types"
    ]
  },
  "exclude": [
    "node_modules"
  ]
}

You can find the code here.