Nuxt 4

Last reviewed Sep 19, 2026

Export as PDF

Prompt Details

Prompt Composition

5prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. Vue 3.554 lines · 1.3K tokens
  4. TypeScript 6.044 lines · 1.3K tokens
  5. Nuxt 474 lines · 3.3K tokens
Total375 lines · 14.3K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 73
  • 78
  • 79
  • 88
  • 89
  • 94
  • 95
  • 113
  • 117
  • 200
  • 201
  • 208
  • 209
  • 214
  • 250
  • 295
  • 297
  • 306
  • 319
  • 323
  • 330
  • 338
  • 346
  • 347
  • 352
  • 354
  • 362
  • 367
  • 377
  • 425
  • 426
  • 444
  • 459
  • 471
  • 488
  • 494
  • 502
  • 524
  • 532
  • 538
  • 552
  • 601
  • 602
  • 614
  • 653
  • 732
  • 770
  • 772
  • 807
  • 829
  • 838
  • 862
  • 863
  • 908
  • 915
  • 916
  • 918
  • 922
  • 942
  • 943
  • 1004
  • 1275
  • 1321
  • 1333

Prompt Preview

Apply the Node.js 24, Vue 3.5, TypeScript 6.0, and JavaScript ES2026 prompts first. These rules target Nuxt 4 with its Nitro 2 and H3 1 integration and were checked against 4.5.2. Nuxt 4.5.2 requires Node.js 24.11.0 or later on the 24 line, and the included Vue prompt's dependency rules apply to the Vue packages it resolves.

Configuration and execution boundaries

  • Declare secrets as private runtimeConfig keys; keep them out of runtimeConfig.public, runtimeConfig.app, app.config.ts, useState, and rendered values. Server-only execution does not make rendered HTML or serialized data private.
  • Supply production runtime overrides through matching NUXT_ environment variables and read them with useRuntimeConfig(event) in server handlers. The built server does not automatically load .env; defaults assigned from differently named process.env variables are evaluated at build time. Validate the effective values after Nuxt's automatic type conversion.
  • Keep Nitro handlers and utilities in server/, Vue app code in app/, and only environment-independent, non-secret utilities and types in shared/. Do not import Nitro runtime code into the Vue app or Vue composables into Nitro handlers.
  • Configure Nitro and Vite through the nitro and vite keys in nuxt.config.ts; separate nitro.config.ts and vite.config.ts files are not Nuxt's configuration source. Review the effective configuration after layers, modules, and $production or named-environment overrides are merged.

Authorization and routing

  • Enforce identity, tenant, object, and action