nuxt/nuxt

easier way to define global `tsconfig` options

Open

#33 678 ouverte le 8 nov. 2025

Voir sur GitHub
 (6 commentaires) (4 réactions) (1 assigné)TypeScript (60 221 stars) (5 607 forks)batch import
good first issuetypes🍰 p2-nice-to-have🛠️ dx

Description

Describe the feature

Since we moved to TS Project References, it's become more difficult to define global TS rules such as noUncheckedIndexedAccess, verbatimModuleSyntax... because users now have to duplicate the same configuration across multiple config keys. I think that most end-users rarely need to add context-spcific rules and mostly define general rules like these.

Could we consider adopting a more DX-friendly approach to specifying TS configuration for v5?

For example:

export default defineNuxtConfig({
  typescript: {
    // customize rules for ALL type contexts
    tsConfig: { /* ... */ },
    // customize tsconfig.app.json
    appTsConfig: { /* ... */ },
    // customize tsconfig.server.json
    serverTsConfig: { /* ... */ },
    // customize tsconfig.shared.json
    sharedTsConfig: { /* ... */ },
    // customize tsconfig.node.json
    nodeTsConfig: { /* ... */ },
  },
})

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

Guide contributeur