ignorePrefix configuration
The ignorePrefix property specifies a prefix for files to ignore during build in app/pages/, app/layouts/, app/middleware/, and public/ directories. Type is string. Default is '-'. Files starting with this prefix will not be processed or served.
imports.dirs configuration
The imports.dirs property specifies an array of custom directories for auto-import. Type is array. Note that this option will not override default directories (~/composables, ~/utils).
imports.global configuration
The imports.global property enables global auto-imports. Type is boolean. Default is false.
imports.scan configuration
The imports.scan property enables scanning app/composables/ and app/utils/ directories for composables to auto-import. Type is boolean. Default is true. Auto-imports registered by Nuxt or other modules will still be enabled.
logLevel configuration
The logLevel property sets the log level when building. Type is string. Default is 'info'. Defaults to 'silent' when running in CI or when TTY is not available. Used as 'silent' in Vite and 'none' in webpack.
modules configuration
The modules property defines Nuxt extensions that extend core functionality and add integrations. Type is array. Each module is string (package name or path), tuple with module and options, or inline function. Modules executed sequentially so order matters. Type can be string (package or path), [string, object] tuple, or function.
modulesDir configuration
The modulesDir property sets the modules directories for path resolving (webpack resolveLoading, nodeExternals, postcss). Type is array. Default is ['/<rootDir>/node_modules']. Configuration path relative to options.rootDir. May be necessary for yarn workspace monorepos.
nitro.routeRules configuration
The nitro.routeRules property configures Nitro route rules. Type is object. See Nitro route rules documentation for details.
nitro.runtimeConfig configuration
The nitro.runtimeConfig property sets Nitro runtime configuration. Type is object. Default includes public: {}, app: { buildId, baseURL, buildAssetsDir, cdnURL }, and nitro: { envPrefix: 'NUXT_' }.
optimization.asyncTransforms.asyncFunctions configuration
The optimization.asyncTransforms.asyncFunctions property specifies async functions that preserve context after await. Type is array. Default includes ['defineNuxtPlugin', 'defineNuxtRouteMiddleware'].
optimization.asyncTransforms.objectDefinitions configuration
The optimization.asyncTransforms.objectDefinitions property specifies object definitions with async properties. defineNuxtComponent defaults to ['asyncData', 'setup']. defineNuxtPlugin defaults to ['setup']. definePageMeta defaults to ['middleware', 'validate'].
optimization.keyedComposables configuration
The optimization.keyedComposables property specifies functions to inject a key for. Type is array. Includes callOnce, defineNuxtComponent, useState, useFetch, useAsyncData, useLazyAsyncData, useLazyFetch with specified argumentLength values. Key is stable between SSR and client hydration.
optimization.treeShake configuration
The optimization.treeShake property enables tree shaking code from specific builds. Can tree shake composables from server or client builds. Client defaults remove onRenderTracked, onRenderTriggered, onServerPrefetch from vue and definePayloadReducer, definePageMeta, onPrehydrate from #app. Server defaults remove client lifecycle hooks from vue and definePageMeta from #app.
pages configuration
The pages property controls vue-router integration in Nuxt 3. If not provided, enabled if app/pages/ directory exists. Can provide glob pattern or array of patterns to scan only certain files for pages.
plugins configuration
The plugins property defines an array of nuxt app plugins. Type is array. Each plugin can be string (absolute or relative path ending with .client or .server for context-specific loading) or object with src and mode keys. Plugins auto-registered from ~/plugins directory and deduplicated by src path.
postcss.order configuration
The postcss.order property defines a strategy for ordering PostCSS plugins. Type is function.
postcss.plugins configuration
The postcss.plugins property configures PostCSS plugins. Includes autoprefixer for parsing CSS and adding vendor prefixes, and cssnano for CSS minification. See PostCSS documentation for details.
rootDir configuration
The rootDir property defines the root directory of your application. Type is string. Default is '/<rootDir>'. Can be overwritten (e.g., running 'nuxt ./my-app/' sets rootDir to absolute path). Normally not needed to configure.
routeRules configuration
The routeRules property applies global route options to matching server routes. Type is object. This is an experimental feature and API may change in future. See Nitro route rules documentation.
router.options configuration
The router.options property provides additional router options passed to vue-router. Nuxt offers additional options to customize the router beyond vue-router options. Only JSON serializable options should be passed; use router.options.ts for more control.
router.options.hashMode configuration
The router.options.hashMode property enables hash history in SPA mode. Type is boolean. Default is false. In this mode, router uses hash character (#) before actual URL. URL is never sent to server and SSR is not supported.
router.options.scrollBehaviorType configuration
The router.options.scrollBehaviorType property customizes scroll behavior for hash links. Type is string. Default is 'auto'.
runtimeConfig configuration
The runtimeConfig property allows passing dynamic config and environment variables to Nuxt app context. Type is object. Value accessible from server only using useRuntimeConfig. Should hold private configuration not exposed frontend. Anything under public and app exposed to frontend. Values automatically replaced by matching env variables at runtime (e.g., NUXT_API_KEY, NUXT_PUBLIC_BASE_URL).
server.builder configuration
The server.builder property specifies the server builder to use for bundling the server part of application. Type is string or { bundle: (nuxt: Nuxt) => Promise<void> }. Default is '@nuxt/nitro-server'. Provides standalone Nitro integration with different patterns like Nitro as Vite plugin.
serverDir configuration
The serverDir property defines the server directory of Nuxt application, where Nitro routes, middleware, and plugins are kept. Type is string. Default is '/<rootDir>/server'. If relative path specified, relative to rootDir.
serverHandlers configuration
The serverHandlers property defines Nitro server handlers. Type is array. Each handler accepts: handler (path to handler file), route (handler route following rou3 conventions), method (HTTP method), middleware (boolean), lazy (boolean for lazy loading). Files from server/api, server/middleware, server/routes auto-registered by Nuxt.
sourcemap configuration
The sourcemap property configures whether and how sourcemaps are generated for server and client bundles. Type is object. Default is {"server": true, "client": false}. Can be single boolean (applies to both) or 'hidden' (generates but no references). Options: true (generates with references), false (no sourcemaps), 'hidden' (no references).
spaLoadingTemplate configuration
The spaLoadingTemplate property defines boolean or path to HTML file with contents inserted into HTML pages rendered with ssr: false. If unset, uses ~/spa-loading-template.html from layers if exists. If false, no SPA loading indicator. If true, looks for ~/spa-loading-template.html or uses default Nuxt image. Default is null.
vite.build.emptyOutDir configuration
The vite.build.emptyOutDir property enables emptying output directory. Type is boolean. Default is false.
srcDir configuration
The srcDir property defines the source directory of Nuxt application. Type is string. Default is 'app' (Nuxt 4) or '.' (Nuxt 3 with compatibilityMode: 3). If relative path specified, relative to rootDir.
ssr configuration
The ssr property enables rendering of HTML dynamically (in server mode) or at generate time. Type is boolean. Default is true. If false, generated pages will have no content.
telemetry configuration
The telemetry property manually disables Nuxt telemetry. See Nuxt Telemetry documentation for more information.
test configuration
The test property indicates whether app is being unit tested. Type is boolean. Default is false.
theme configuration
The theme property extends project from local or remote source. Value should be string pointing to source directory or config path relative to current config. Supports github:, gitlab:, bitbucket:, https:// protocols to extend from remote git repository.
typescript.builder configuration
The typescript.builder property specifies which builder types to include for project. Default is null. Can turn off builder environment types with false or opt for 'shared' option (advised for module authors supporting multiple builders).
typescript.hoist configuration
The typescript.hoist property specifies modules to generate deep aliases for within compilerOptions.paths. Type is array. Default includes nitro/types, nitro/runtime-config, defu, h3, vue, vue-router and other core dependencies. Does not yet support subpaths. May be necessary for pnpm monorepos with shamefully-hoist=false.
typescript.includeWorkspace configuration
The typescript.includeWorkspace property includes parent workspace in Nuxt project. Type is boolean. Default is false. Mostly useful for themes and module authors.
typescript.nodeTsConfig configuration
The typescript.nodeTsConfig property extends generated .nuxt/tsconfig.node.json TypeScript configuration.
typescript.serverTsConfig configuration
The typescript.serverTsConfig property extends generated .nuxt/tsconfig.server.json TypeScript configuration. Options set here take precedence over tsConfig.
typescript.sharedTsConfig configuration
The typescript.sharedTsConfig property extends generated .nuxt/tsconfig.shared.json TypeScript configuration.
typescript.shim configuration
The typescript.shim property generates *.vue shim. Type is boolean. Default is false. Recommended to let official Vue extension generate accurate types. Set to true if using libraries like ESLint unable to understand .vue file types.
typescript.strict configuration
The typescript.strict property enables TypeScript safety checks for stricter type checking. Type is boolean. Default is true. See TypeScript handbook for stricter checks details.
typescript.tsConfig configuration
The typescript.tsConfig property extends generated tsconfig files with shared options. compilerOptions apply to all generated tsconfigs, while include, exclude, vueCompilerOptions apply only to .nuxt/tsconfig.app.json. DOM/Vue options apply only to app config. types, paths, noEmit managed per context. Use appTsConfig, serverTsConfig, nodeTsConfig, sharedTsConfig for context-specific overrides.
typescript.typeCheck configuration
The typescript.typeCheck property enables build-time type checking. Type is boolean or 'build'. Default is false. If true, type checks in development. Set to 'build' to restrict to build-time only. Requires typescript and vue-tsc as dev dependencies.
unhead.legacy configuration
The unhead.legacy property enables legacy compatibility mode for unhead module. Type is boolean. Default is false. Disables Capo.js sorting, adds DeprecationsPlugin supporting hid/vmid/children/body, adds PromisesPlugin supporting promises as input.
unhead.renderSSRHeadOptions configuration
The unhead.renderSSRHeadOptions property is an object passed to renderSSRHead to customize output. Type is object. Default is {"omitLineBreaks": false}.
vite configuration
The vite property passes configuration directly to Vite. Top-level options shared across client and server environments. Use $client and $server for environment-specific configuration merged into respective builds. Not all vite options supported in Nuxt.
vite.$client configuration
The vite.$client property provides configuration merged into Vite's configuration for client (browser) build. Type is object.
vite.$server configuration
The vite.$server property provides configuration merged into Vite's configuration for server build. Type is object.
vite.define configuration
The vite.define property defines global constants. Type is object. Default defines __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ as false, process.dev as false, import.meta.dev as false, process.test as false, import.meta.test as false.
vite.esbuild configuration
The vite.esbuild property configures esbuild options. Type is object. Default includes target 'esnext', jsxFactory 'h', jsxFragment 'Fragment', tsconfigRaw {}.
vite.mode configuration
The vite.mode property sets Vite mode. Type is string. Default is 'production'.
vite.optimizeDeps.esbuildOptions configuration
The vite.optimizeDeps.esbuildOptions property configures esbuild options for optimizing dependencies. Type is object. Default includes target 'esnext', jsxFactory 'h', jsxFragment 'Fragment', tsconfigRaw {}.
vite.optimizeDeps.exclude configuration
The vite.optimizeDeps.exclude property excludes dependencies from optimization. Type is array. Default is ['vue-demi'].
vite.resolve.extensions configuration
The vite.resolve.extensions property specifies file extensions for resolution. Type is array. Default includes '.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'.
vite.root configuration
The vite.root property sets Vite root directory. Type is string. Default is '/<rootDir>'.
vite.server.fs.allow configuration
The vite.server.fs.allow property specifies allowed directories for Vite dev server file access. Type is array. Default includes '/<rootDir>/.nuxt', '/<rootDir>/app', '/<rootDir>', '/<workspaceDir>'.
vite.vue.features.propsDestructure configuration
The vite.vue.features.propsDestructure property enables props destructuring in Vue. Type is boolean. Default is true.
vite.vue.isProduction configuration
The vite.vue.isProduction property sets Vue production mode. Type is boolean. Default is true.
vite.vue.template.compilerOptions configuration
The vite.vue.template.compilerOptions property configures Vue template compiler options. Type is object.