\n\nWhere I use config then, it shows me typing error.\nWhen I switch to the legacy tsconfig, typing issue are gone.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nTypecheck summary: \n\n\n\napp/layouts/default.vue:35:33 - error TS2339: Property 'title' does not exist on type '{}'.\n\n35 title: appConfig.information?.title,\n ~~~~~\n\napp/layouts/default.vue:36:39 - error TS2339: Property 'description' does not exist on type '{}'.\n\n36 description: appConfig.information?.description,\n ~~~~~~~~~~~\n\napp/layouts/default.vue:39:36 - error TS2339: Property 'socials' does not exist on type '{}'.\n\n39 github: appConfig.information?.socials?.github,\n ~~~~~~~\n\napp/layouts/default.vue:40:38 - error TS2339: Property 'socials' does not exist on type '{}'.\n\n40 linkedin: appConfig.information?.socials?.linkedin,\n ~~~~~~~\n\napp/layouts/default.vue:41:40 - error TS2339: Property 'birthdate' does not exist on type '{}'.\n\n41 isBirthday: appConfig.information?.birthdate ? isBirthday(appConfig.information?.birthdate) : false,\n ~~~~~~~~~\n\napp/layouts/default.vue:41:86 - error TS2339: Property 'birthdate' does not exist on type '{}'.\n\n41 isBirthday: appConfig.information?.birthdate ? isBirthday(appConfig.information?.birthdate) : false,\n ~~~~~~~~~\n\napp/layouts/default.vue:44:27 - error TS2339: Property 'icons' does not exist on type '{}'.\n\n44 normal: appConfig.ui?.icons?.normal as string[] ?? [],\n ~~~~~\n\napp/layouts/default.vue:45:29 - error TS2339: Property 'icons' does not exist on type '{}'.\n\n45 birthday: appConfig.ui?.icons?.birthday as string[] ?? [],\n ~~~~~\n\napp/middleware/title.global.ts:5:28 - error TS2571: Object is of type 'unknown'.\n\n5 const appConfigTitle = useAppConfig().information.title;\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n\napp/pages/index.vue:14:62 - error TS2339: Property 'messages' does not exist on type '{}'.\n\n14 const messages = useState('randomIndex', () => appConfig.ui?.messages?.sort(() => Math.random() - 0.5))\n ~~~~~~~~\n\nnuxt.schema.ts:3:16 - error TS2304: Cannot find name 'defineNuxtSchema'.\n\n3 export default defineNuxtSchema({\n ~~~~~~~~~~~~~~~~\n\nnuxt.schema.ts:3:16 - error TS2304: Cannot find name 'defineNuxtSchema'.\n\n3 export default defineNuxtSchema({\n ~~~~~~~~~~~~~~~~\n\nnuxt.schema.ts:3:16 - error TS2304: Cannot find name 'defineNuxtSchema'.\n\n3 export default defineNuxtSchema({\n ~~~~~~~~~~~~~~~~\n```",[3018,3021],{"name":3019,"color":3020},"pending triage","E99695",{"name":3022,"color":3023},"possible regression","B90A42",32768,"nuxt","open","useAppConfig lose types from nuxt schema with new tsconfig","2025-07-25T22:51:01Z","https://github.com/nuxt/nuxt/issues/32768",0.66287255,{"description":3032,"labels":3033,"number":3035,"owner":3025,"repository":3025,"state":3026,"title":3036,"updated_at":3037,"url":3038,"score":3039},"### Environment\n\n-\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-jhzonc\n\n### Describe the bug\n\nCreating the following local module\r\n\r\n```\r\n.nuxt\r\nmodules/\r\n└── hello/\r\n ├── runtime/\r\n │ └── plugin.ts\r\n └── index.ts\r\ntsconfig.json\r\n```\r\n\r\nwill autogenerate the following `.nuxt/tsconfig.json`:\r\n\r\n```json\r\n\"include\": [\r\n \"../modules/hello/runtime\",\r\n ],\r\n \"exclude\": [\r\n \"../modules/hello\",\r\n \"../modules/hello/runtime/server\",\r\n ]\r\n```\r\n\r\nSo both `modules/hello/index.ts` and `modules/hello/runtime/plugin.ts` files do not inherit the tsconfig. My code (with errors as comments):\r\n\r\n`index.ts`\r\n```ts\r\nimport { addPlugin, createResolver, defineNuxtModule } from '@nuxt/kit'\r\n\r\nexport default defineNuxtModule({\r\n setup() {\r\n console.log('Hi from module!')\r\n \r\n // ts-error: The 'import.meta' meta-property is only allowed when the '--module'...\r\n const { resolve } = createResolver(import.meta.url) \r\n\r\n addPlugin({\r\n src: resolve('./runtime/plugin'),\r\n })\r\n },\r\n})\r\n```\r\n\r\n`plugin.ts`\r\n```ts\r\n// ts-error: Cannot find module '#imports' or its corresponding type declarations\r\nimport { defineNuxtPlugin } from '#imports'\r\n\r\nexport default defineNuxtPlugin(() => {\r\n console.log('Hi from plugin')\r\n})\r\n```\r\n\r\nRemoving `\"../modules/hello\"` from the `exclude` array will then remove the ts-errors, as expected.\r\n\r\nSo, is this expected behaviour? Is there a way to disable it? Am I missing something?\r\n\r\nAny help will be really appreciated. \r\n\r\nThanks in advanced.\r\n\r\nP.S.\r\n\r\nI am also using Volar Takeover mode, which made me realize that I do not even understand why are those errors thrown in the first place if both files are explicitly excluded. But I guess that's a separate volar question/issue. \r\n\r\n\r\nAnd my root `tsconfig.json` just extends the autogenerated config as recommended:\r\n\r\n```json\r\n{\r\n \"extends\": \"./.nuxt/tsconfig.json\"\r\n}\r\n```\r\n\r\n\r\n\r\n\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3034],{"name":3019,"color":3020},23794,"Automatically generated `.nuxt/tsconfig.json` excludes `modules` folder.","2024-06-30T11:07:13Z","https://github.com/nuxt/nuxt/issues/23794",0.66990024,{"description":3041,"labels":3042,"number":3055,"owner":3025,"repository":3025,"state":3056,"title":3057,"updated_at":3058,"url":3059,"score":3060},"### Describe the feature\n\nRight now, there's no way to get a module options defined in `nuxt.config.ts`.\r\n\r\nThe only way currently is to write `nuxt.config.ts` like this:\r\n\r\n```ts\r\nimport { defineNuxtConfig } from \"nuxt/config\"\r\nimport MyModule from \"..\"\r\n\r\nconst config = {\r\n foo: \"bar\",\r\n toto: \"tata\",\r\n}\r\n\r\nexport default defineNuxtConfig({\r\n modules: [MyModule ],\r\n moduleConfig: config,\r\n\r\n runtimeConfig: {\r\n public: {\r\n moduleConfig: config,\r\n },\r\n },\r\n})\r\n```\r\n\r\nIt is extremely redundant. And it's made even *worse* if `MyModule` has default properties, because they will not be put in the runtime config.\n\n### Additional information\n\n- [ ] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [X] Read the [contribution guide](https://v3.nuxtjs.org/community/contribution).\n- [X] Check existing [discussions](https://github.com/nuxt/framework/discussions) and [issues](https://github.com/nuxt/framework/issues).",[3043,3046,3049,3052],{"name":3044,"color":3045},"enhancement","8DEF37",{"name":3047,"color":3048},"documentation","5319e7",{"name":3050,"color":3051},"workaround available","11376d",{"name":3053,"color":3054},"kit","60E14C",15553,"closed","add kit utilities for augmenting app and runtime config","2024-12-16T23:14:24Z","https://github.com/nuxt/nuxt/issues/15553",0.62682664,{"description":3062,"labels":3063,"number":3068,"owner":3025,"repository":3025,"state":3056,"title":3069,"updated_at":3070,"url":3071,"score":3072},"### Describe the feature\r\n\r\nThere is some documentation about how to define the config, however no example of how to use it.\r\nhttps://nuxt.com/docs/guide/directory-structure/app-config\r\n\r\nCould you please provide some examples and use cases?\r\n\r\nI'm struggling how to use it. How does this differ from the `runtimeConfig.public` ? \r\nhttps://nuxt.com/docs/api/configuration/nuxt-config#runtimeconfig\r\n\r\nI tried this with no success...\r\n\r\n### app.config.ts\r\n```ts\r\nexport default defineAppConfig({\r\n foo: \"bar\",\r\n});\r\n```\r\n\r\n### app.vue\r\n```ts\r\nconst nuxtApp = useNuxtApp();\r\n\r\nconsole.log(nuxtApp.$config.foo); // undefined\r\n```\r\n\r\n### Additional information\r\n\r\n- [X] Would you be willing to help implement this feature?\r\n- [ ] Could this feature be implemented as a module?\r\n\r\n### Final checks\r\n\r\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\r\n- [X] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[3064,3067],{"name":3065,"color":3066},"3.x","29bc7f",{"name":3019,"color":3020},22595,"Documentation - app.config.ts","2023-08-11T14:11:42Z","https://github.com/nuxt/nuxt/issues/22595",0.6287277,{"labels":3074,"number":3079,"owner":3025,"repository":3025,"state":3056,"title":3080,"updated_at":3081,"url":3082,"score":3083},[3075,3076],{"name":3044,"color":3045},{"name":3077,"color":3078},"2.x","d4c5f9",8481,"how can I config in nuxt.config.js such app.disable('x-powered-by') or other like this (app.use()) or require('some-middleware-which-need-to-call-with-app-param')(app);","2023-01-22T15:52:44Z","https://github.com/nuxt/nuxt/issues/8481",0.6399305,{"description":3085,"labels":3086,"number":3092,"owner":3025,"repository":3025,"state":3056,"title":3093,"updated_at":3094,"url":3095,"score":3096},"In Nuxt 3, we have introduced a new package `@nuxt/schema` that holds types, defaults, and documentation for all build-in configurations for Nuxt and from one source using [untyped](https://github.com/unjs/untyped). In comparation with Nuxt 2, these were separately maintained, often with inconsistencies. This new system is also designed to be future proof to be able to **manage configuration via UI** using generated (JSON)Schema files and also **runtime validation** to notice any usage issues.\r\n\r\nFor Nuxt modules, it is already possible to extend a typescript interface `ModuleOptions` to provide types, however it has same limitations of Nuxt 2 era. We have introduced new `schema` in new `@nuxt/kit` module definition system however it became unused.\r\n\r\nWith the introduction of Nuxt Layers, themes can also now require some specific configuration. Most importantly for configuring `runtimeConfig` and app config (either via `appConfig` or `app.config`)\r\n\r\nFor this, we can use the same tooling (untyped) as a built-in feature to allow providing custom configuration schemas from Nuxt layers and modules (also directly from a Nuxt project). Benefiting from most possibilities (note 1) we have already for core config.\r\n\r\nWe have made an experiment [nuxt-experiments/nuxt-config-schema](https://github.com/nuxt-experiments/nuxt-config-schema) that is now almost ready to be moved into a core experiment, allowing to make it better usable. It is possible to provide custom config schema for nuxt projects in different ways:\r\n\r\n- Using `nuxt.schema.ts` in main Nuxt project or a layer\r\n- Using `$schema` key in `nuxt.config`\r\n- Extend `nuxt.options.$schema` for modules\r\n- Extend schema using `schema:extend`, `schema:resolved` and `schema:beforeWrite` for modules (note 2)\r\n- Use `schema` in `defineNuxtModule` (recommended way for modules. also supports defaults)\r\n\r\nThe output will be in `.nuxt` directory and initially mainly usable for the Augmentation of types and custom purposes such as UI.\r\n\r\n\r\n**Notes:**\r\n\r\nnote 1: Since development and trial of the experimental module, one particularly important point we found is that, unlike the core usage, mixing schema with defaults is not a good practice. We can only merge schema after modules are setup and it is too late for them to **re**apply new defaults and do their config handling logic and also it makes it much harder to merge runtime configuration such as `app.config` since custom merger logic resides in runtime while schema is in the build-time namespace and merging strategy is different.\r\n\r\nnote 2: We have introduced two separate hooks. `extend`/`resolve` as main way to extend schema just after all modules are initialized and before core or any other place tries to use schema and another `beforeWrite` as last resort (less recommended) for when a module needs to extend schema based on build aftertifacts coming from webpack, rollup or nitro's rollup step and it mainly and only affects the written files.\r\n\r\n\r\n\r\n\r\n\r\n",[3087,3088,3091],{"name":3044,"color":3045},{"name":3089,"color":3090},"discussion","538de2",{"name":3065,"color":3066},15592,"Custom config schema","2023-04-07T01:47:49Z","https://github.com/nuxt/nuxt/issues/15592",0.64611423,{"description":3098,"labels":3099,"number":3102,"owner":3025,"repository":3025,"state":3056,"title":3103,"updated_at":3104,"url":3105,"score":3106},"### Describe the bug\r\n\r\nNuxt 3.3 allow developers to use `useAppConfig` in Nitro environment and `server` directory.\r\n\r\n> We now support useAppConfig in nitro server routes (https://github.com/nuxt/nuxt/pull/19489) - a long-awaited change. Now useAppConfig is consistently available throughout your app for non-runtime configuration from layers, modules, etc.\r\n\r\nconsidering that, the docuemntation on [`app-config`](https://nuxt.com/docs/guide/directory-structure/app-config) is outdated.\r\n> Support for accessing useAppConfig() in Nitro and server directory is [coming soon](https://github.com/nuxt/nuxt/pull/19489) and available on [edge-channel](https://nuxt.com/docs/guide/going-further/edge-channel).\r\n\r\nthe solution would be removing this banner completely and since the previous paragraph states that:\r\n> We can universally access theme both when server-rendering the page and in the browser using [useAppConfig](https://nuxt.com/docs/api/composables/use-app-config) composable.\r\n\r\nthere would be no need to add more context.\r\n",[3100,3101],{"name":3065,"color":3066},{"name":3019,"color":3020},19816,"Outdated docs after nuxt 3.3.1 release","2023-03-20T09:25:12Z","https://github.com/nuxt/nuxt/issues/19816",0.64625967,{"description":3108,"labels":3109,"number":3112,"owner":3025,"repository":3025,"state":3056,"title":3113,"updated_at":3114,"url":3115,"score":3116},"### Environment\n\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.15.0`\r\n- Nuxt Version: `3.0.0-rc.8-27692155.9db2229`\r\n- Package Manager: `yarn@1.22.19`\r\n- Builder: `vite`\r\n- User Config: `vuestic`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\n\n### Reproduction\n\n- Create new nuxt app `npx nuxi init nuxt-app`\r\n- Use latest nuxt3 `\"nuxt\": \"npm:nuxt3@latest\",`\r\n- Change app.vue to:\r\n ```vue\r\n \u003Ctemplate>\r\n \u003Cdiv>\r\n \u003C/div>\r\n \u003C/template>\r\n \r\n \u003Cscript setup lang=\"ts\">\r\n import { defineNuxtPlugin } from 'nuxt/app'\r\n \r\n console.log(defineNuxtPlugin)\r\n \u003C/script>\r\n ```\r\n We need any import from nuxt/app to get `nuxt` in server's node_modules.\r\n\r\n- Build and preview app. `nr build && nr preview`\r\n\r\n---\r\nWe faced this issue in `@vuestic/nuxt` module which use `defineNuxtPlugin`. (see https://github.com/epicmaxco/vuestic-ui/issues/2315)\n\n### Describe the bug\n\nIn server node_modules `nuxt`'s `config.js` imports `#build/app.config.mjs` which is not defined in package.json imports.\r\n\r\n```ts\r\nimport __appConfig from \"#build/app.config.mjs\";\r\n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\nTypeError [ERR_PACKAGE_IMPORT_NOT_DEFINED]: Package import specifier \"#build/app.config.mjs\" is not defined in package /home/m0ksem/projects/temp/nuxt-app/.output/server/node_modules/nuxt/package.json imported from /home/m0ksem/projects/temp/nuxt-app/.output/server/node_modules/nuxt/dist/app/config.mjs\n```\n",[3110,3111],{"name":3065,"color":3066},{"name":3019,"color":3020},14728,"\"#build/app.config.mjs\" is not defined in package imports","2024-01-22T16:28:00Z","https://github.com/nuxt/nuxt/issues/14728",0.6463491,{"description":3118,"labels":3119,"number":3126,"owner":3025,"repository":3025,"state":3056,"title":3127,"updated_at":3128,"url":3129,"score":3130},"Following up nuxt/nuxt.js#14330 (editable `app.config`), notes in initial implementation nuxt/framework#6333 and ideas from @Tahul in #6779, i've created this issue to track some potential improvements before releasing this new feature in next RC. (currently support is available on edge. Docs: https://v3.nuxtjs.org/guide/features/app-config)\r\n\r\n- [x] Initial support (#6136)\r\n- [x] Support HMR after destructing objects with deep assignment (#6788)\r\n- [x] Use `defu. defuFn ` to allow _overrriding_ arrays in multi-layer format (#6905)\r\n- [x] Support `updateAppConfig` with deep assignment (#6905)\r\n- [x] Support `app.config` for server (https://github.com/nuxt/nuxt/pull/19489)\r\n- [ ] ~~Allow multiple named exports from `app.config` (@Atinux idea)~~ (canceled because `defineAppConfig` type benefits will be lost this way)\r\n\r\n--- \r\n\r\nResources:\r\n\r\n- Example for custom app configs: https://stackblitz.com/edit/github-al5fwp?file=module.ts,app.vue,custom.config.ts",[3120,3121,3122,3123],{"name":3044,"color":3045},{"name":3089,"color":3090},{"name":3065,"color":3066},{"name":3124,"color":3125},"🍰 p2-nice-to-have","0E8A16",14670,"`app.config` improvements","2023-04-19T08:23:47Z","https://github.com/nuxt/nuxt/issues/14670",0.6561331,{"description":3132,"labels":3133,"number":3139,"owner":3025,"repository":3025,"state":3056,"title":3140,"updated_at":3141,"url":3142,"score":3143},"### Environment\r\n\r\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: 3.8.2\r\n- CLI Version: 3.10.0\r\n- Nitro Version: 2.8.1\r\n- Package Manager: npm@9.4.2\r\n- Builder: -\r\n- User Config: devtools, extends\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-bcxfrv\r\n\r\n### Describe the bug\r\n\r\nI need to merge app.config from different layers, and I use namespace imports to combine different parts of the config, e.g:\r\n```ts\r\nimport * as pages from './config/pages'\r\n\r\nexport default defineAppConfig({\r\n pages,\r\n})\r\n```\r\nCheck the console:\r\nExpected: \r\n```js\r\n{ nuxt: { buildId: 'dev' }, pages: { foo: { nested: 1 }, bar: 2 } }\r\n```\r\nActual: \r\n```js\r\n{ nuxt: { buildId: 'dev' }, pages: { bar: 2 } }\r\n```\r\n\r\n### Additional context\r\n\r\nIt was working fine in 3.7.4.\r\n\r\nAlso works fine if change import from namespace to named:\r\n```ts\r\nimport { foo } from './config/pages'\r\n\r\nexport default defineAppConfig({\r\n pages: {\r\n foo\r\n }\r\n})\r\n```\r\n\r\n### Logs\r\n\r\n_No response_",[3134,3135,3136],{"name":3065,"color":3066},{"name":3019,"color":3020},{"name":3137,"color":3138},"upstream","E8A36D",24708,"Nuxt doesn't merge `app.config` fields imported using namespace import","2024-01-05T20:30:35Z","https://github.com/nuxt/nuxt/issues/24708",0.66233546,["Reactive",3145],{},["Set"],["ShallowReactive",3148],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f0QZUCLZKTMObIvdl4JHVAphKWVo4Of1p6C94qlqlE24":-1},"/nuxt/nuxt/18762"]