Nuxt 4
Last reviewed Sep 19, 2026
Prompt Details
Prompt Composition
5prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- Vue 3.554 lines · 1.3K tokens
- TypeScript 6.044 lines · 1.3K tokens
- 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
runtimeConfigkeys; keep them out ofruntimeConfig.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 withuseRuntimeConfig(event)in server handlers. The built server does not automatically load.env; defaults assigned from differently namedprocess.envvariables 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 inapp/, and only environment-independent, non-secret utilities and types inshared/. Do not import Nitro runtime code into the Vue app or Vue composables into Nitro handlers. - Configure Nitro and Vite through the
nitroandvitekeys innuxt.config.ts; separatenitro.config.tsandvite.config.tsfiles are not Nuxt's configuration source. Review the effective configuration after layers, modules, and$productionor named-environment overrides are merged.
Authorization and routing
- Enforce identity, tenant, object, and action