Skip to content
Index

[Nuxt] Set up TypeScript type checking in a Nuxt project

Tested with: Nuxt v3

Whilst Nuxt supports TypeScript, it doesn’t enable type checking (at build time) by default.

To enable this, first install the dependencies.

Terminal window
npm i -D vue-tsc typescript

Then update your config file:

nuxt.config.ts
export default defineNuxtConfig({
typescript: {
typeCheck: true,
},
});