Skip to content

DX: Enable local TypeScript checking during development #5

@TusharW4ni

Description

@TusharW4ni

Context / Problem

By default, Nuxt 4 strips TypeScript types during the build process but does not explicitly type-check during nuxt dev for performance reasons. This means developers might write code that has TypeScript errors but still runs in development, only to fail later in the build or cause subtle bugs.

Proposed Solution

Enable local type-checking so errors appear directly in the terminal during development.

Implementation Details

  1. Install vue-tsc and typescript as development dependencies (if not already strictly required).
  2. Update nuxt.config.ts to enable type checking:
    export default defineNuxtConfig({
      typescript: {
        typeCheck: true
      }
    })

Acceptance Criteria

  • Type errors are logged to the terminal when running pnpm dev.
  • Existing types in the boilerplate are verified to be fully sound.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions