Socket
Socket
Sign inDemoInstall

@nuxt/schema

Package Overview
Dependencies
Maintainers
5
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/schema - npm Package Compare versions

Comparing version 3.0.0-rc.12 to 3.0.0-rc.13

16

package.json
{
"name": "@nuxt/schema",
"version": "3.0.0-rc.12",
"version": "3.0.0-rc.13",
"repository": "nuxt/framework",

@@ -16,7 +16,7 @@ "license": "MIT",

"@types/semver": "^7",
"@vitejs/plugin-vue": "^3.1.2",
"@vueuse/head": "~1.0.0-rc.9",
"nitropack": "^0.6.0",
"@vitejs/plugin-vue": "^3.2.0",
"@vueuse/head": "~1.0.0-rc.14",
"nitropack": "^0.6.1",
"unbuild": "latest",
"vite": "~3.1.8"
"vite": "~3.2.2"
},

@@ -29,3 +29,3 @@ "dependencies": {

"pathe": "^0.3.9",
"pkg-types": "^0.3.5",
"pkg-types": "^0.3.6",
"postcss-import-resolver": "^2.0.0",

@@ -35,9 +35,9 @@ "scule": "^0.3.2",

"ufo": "^0.8.6",
"unimport": "^0.6.8",
"unimport": "^0.7.0",
"untyped": "^0.5.0"
},
"engines": {
"node": "^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0"
"node": "^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"scripts": {}
}

@@ -46,3 +46,2 @@ {

"fs": {
"strict": false,
"allow": [

@@ -52,2 +51,3 @@ "/<rootDir>/.nuxt",

"/<rootDir>",
"/<rootDir>",
"/<rootDir>/node_modules",

@@ -73,8 +73,3 @@ "/Users/pooya/Code/framework/packages/schema/node_modules"

},
"dev": false,
"vue": {
"config": {
"silent": true,
"performance": false
},
"compilerOptions": {}

@@ -85,3 +80,2 @@ },

"buildAssetsDir": "/_nuxt/",
"assetsPath": {},
"cdnURL": "",

@@ -103,25 +97,12 @@ "head": {

},
"layoutTransition": {
"name": "layout",
"mode": "out-in"
},
"pageTransition": {
"name": "page",
"mode": "out-in"
},
"layoutTransition": false,
"pageTransition": false,
"keepalive": false
},
"meta": {
"meta": [],
"link": [],
"style": [],
"script": []
},
"dev": false,
"plugins": [],
"css": [],
"srcDir": "/<rootDir>",
"buildDir": "/<rootDir>/.nuxt",
"appTemplatePath": "/<rootDir>/.nuxt/views/app.template.html",
"dir": {
"store": "store",
"assets": "assets",
"app": "app",
"layouts": "layouts",

@@ -134,137 +115,26 @@ "middleware": "middleware",

},
"store": false,
"vueMeta": null,
"head": {
"meta": [],
"link": [],
"style": [],
"script": []
"build": {
"transpile": [],
"templates": [],
"analyze": false
},
"fetch": {
"buildDir": "/<rootDir>/.nuxt",
"workspaceDir": "/<rootDir>",
"modulesDir": [
"/<rootDir>/node_modules",
"/Users/pooya/Code/framework/packages/schema/node_modules"
],
"builder": "@nuxt/vite-builder",
"sourcemap": {
"server": true,
"client": true
"client": false
},
"plugins": [],
"extendPlugins": null,
"css": [],
"layouts": {},
"ErrorPage": null,
"loading": {
"color": "black",
"failedColor": "red",
"height": "2px",
"throttle": 200,
"duration": 5000,
"continuous": false,
"rtl": false,
"css": true
},
"messages": {
"loading": "Loading...",
"error_404": "This page could not be found",
"server_error": "Server error",
"nuxtjs": "Nuxt",
"back_to_home": "Back to the home page",
"server_error_details": "An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.",
"client_error": "Error",
"client_error_details": "An error occurred while rendering the page. Check developer tools console for details."
},
"loadingIndicator": {
"name": "default",
"color": "black",
"color2": "#F5F5F5",
"background": "white",
"dev": false,
"loading": "Loading..."
},
"render": {
"ssr": {},
"bundleRenderer": {
"runInNewContext": false
},
"crossorigin": {},
"resourceHints": true,
"ssrLog": false,
"http2": {
"push": false,
"shouldPush": null,
"pushAssets": null
},
"static": {
"prefix": true
},
"compressor": {
"threshold": 0
},
"etag": {
"hash": false,
"weak": false
},
"csp": false,
"dist": {
"index": false,
"maxAge": "1y"
},
"fallback": {
"dist": {},
"static": {
"skipUnknown": true,
"handlers": {
"": {
"htm": false,
"html": false
}
}
}
}
},
"pageTransition": {
"name": "page",
"mode": "out-in",
"appear": false,
"appearClass": "appear",
"appearActiveClass": "appear-active",
"appearToClass": "appear-to"
},
"layoutTransition": {
"name": "layout",
"mode": "out-in"
},
"features": {
"store": true,
"layouts": true,
"meta": true,
"middleware": true,
"transitions": true,
"deprecations": true,
"validate": true,
"useAsyncData": true,
"fetch": true,
"clientOnline": true,
"clientPrefetch": true,
"componentAliases": true,
"componentClientOnly": true
},
"extends": null,
"theme": null,
"workspaceDir": "/<rootDir>",
"serverDir": "/<rootDir>/server",
"test": false,
"debug": false,
"env": {},
"target": "server",
"ssr": true,
"mode": "spa",
"modern": {},
"modules": [],
"buildModules": [],
"_modules": [],
"_installedModules": [],
"globalName": "nuxt",
"globals": {},
"serverMiddleware": [],
"modulesDir": [
"/<rootDir>/node_modules",
"/Users/pooya/Code/framework/packages/schema/node_modules"
],
"extensions": [

@@ -278,12 +148,2 @@ ".js",

],
"styleExtensions": [
".css",
".pcss",
".postcss",
".styl",
".stylus",
".scss",
".sass",
".less"
],
"alias": {

@@ -305,4 +165,2 @@ "~~": "/<rootDir>",

],
"_nuxtConfigFiles": [],
"watch": [],
"watchers": {

@@ -329,2 +187,25 @@ "rewatchOnRawEvents": {},

"appConfig": {},
"devServer": {
"https": false,
"port": 3000,
"host": "localhost",
"url": "http://localhost:3000"
},
"experimental": {
"asyncEntry": false,
"reactivityTransform": false,
"externalVue": true,
"treeshakeClientOnly": true,
"viteNode": true,
"viteServerDynamicImports": true,
"inlineSSRStyles": true,
"noScripts": false,
"payloadExtraction": true,
"crossOriginPrefetch": false,
"writeEarlyHints": false
},
"generate": {
"routes": [],
"exclude": []
},
"_majorVersion": 2,

@@ -339,3 +220,12 @@ "_legacyGenerate": false,

"_nuxtConfigFile": {},
"_nuxtConfigFiles": [],
"appDir": "",
"_installedModules": [],
"_modules": [],
"routeRules": {},
"nitro": {
"routeRules": {}
},
"serverHandlers": [],
"devServerHandlers": [],
"postcss": {

@@ -350,4 +240,7 @@ "config": false,

},
"router": {
"options": {}
},
"typescript": {
"strict": false,
"strict": true,
"includeWorkspace": false,

@@ -358,149 +251,2 @@ "typeCheck": false,

},
"build": {
"transpile": [],
"cssSourceMap": false,
"extractCSS": false,
"quiet": false,
"analyze": false,
"profile": false,
"ssr": {},
"parallel": false,
"cache": false,
"standalone": false,
"publicPath": {},
"serverURLPolyfill": "url",
"filenames": {},
"loaders": {
"file": {
"esModule": false
},
"fontUrl": {
"esModule": false,
"limit": 1000
},
"imgUrl": {
"esModule": false,
"limit": 1000
},
"pugPlain": {},
"vue": {
"productionMode": true,
"transformAssetUrls": {
"video": "src",
"source": "src",
"object": "src",
"embed": "src"
},
"compilerOptions": {}
},
"css": {
"importLoaders": 0,
"esModule": false,
"sourcemap": false
},
"cssModules": {
"importLoaders": 0,
"esModule": false,
"modules": {
"localIdentName": "[local]_[hash:base64:5]"
},
"sourcemap": false
},
"less": {
"sourcemap": false
},
"sass": {
"sassOptions": {
"indentedSyntax": true
},
"sourcemap": false
},
"scss": {
"sourcemap": false
},
"stylus": {
"sourcemap": false
},
"vueStyle": {
"sourcemap": false
}
},
"styleResources": {},
"plugins": [],
"terser": {},
"hardSource": false,
"aggressiveCodeRemoval": false,
"optimizeCSS": false,
"optimization": {
"runtimeChunk": "single",
"minimize": true,
"minimizer": {},
"splitChunks": {
"chunks": "all",
"automaticNameDelimiter": "/",
"cacheGroups": {}
}
},
"splitChunks": {
"layouts": false,
"pages": true,
"commons": true
},
"corejs": "auto",
"babel": {
"configFile": false,
"babelrc": false,
"plugins": [],
"presets": {},
"cacheDirectory": false
},
"postcss": {
"postcssOptions": {
"config": false,
"plugins": {
"postcss-import": {},
"postcss-url": {},
"autoprefixer": {},
"cssnano": true
}
},
"order": ""
},
"html": {
"minify": {
"collapseBooleanAttributes": true,
"decodeEntities": true,
"minifyCSS": true,
"minifyJS": true,
"processConditionalComments": true,
"removeEmptyAttributes": true,
"removeRedundantAttributes": true,
"trimCustomFragments": true,
"useShortDoctype": true
}
},
"template": {},
"templates": [],
"watch": [],
"devMiddleware": {
"stats": "none"
},
"hotMiddleware": {},
"vendor": {
"$meta": {
"deprecated": "vendor has been deprecated since nuxt 2"
}
},
"stats": {
"excludeAssets": [
{},
{},
{}
]
},
"friendlyErrors": true,
"additionalExtensions": [],
"warningIgnoreFilters": [],
"followSymlinks": false
},
"webpack": {

@@ -602,82 +348,3 @@ "analyze": false,

"warningIgnoreFilters": []
},
"sourcemap": {
"server": true,
"client": false
},
"routeRules": {},
"nitro": {
"routeRules": {}
},
"serverHandlers": [],
"devServerHandlers": [],
"experimental": {
"asyncEntry": false,
"reactivityTransform": false,
"externalVue": true,
"treeshakeClientOnly": true,
"viteNode": true,
"viteServerDynamicImports": true,
"inlineSSRStyles": true,
"noScripts": false,
"payloadExtraction": true,
"crossOriginPrefetch": false,
"writeEarlyHints": true
},
"builder": "@nuxt/vite-builder",
"router": {
"options": {},
"mode": "history",
"base": "/",
"_routerBaseSpecified": true,
"routes": [],
"routeNameSplitter": "-",
"middleware": [],
"linkActiveClass": "nuxt-link-active",
"linkExactActiveClass": "nuxt-link-exact-active",
"linkPrefetchedClass": false,
"extendRoutes": null,
"scrollBehavior": {},
"parseQuery": false,
"stringifyQuery": false,
"fallback": false,
"prefetchLinks": true,
"prefetchPayloads": true,
"trailingSlash": {}
},
"server": {
"https": false,
"port": 3000,
"host": "localhost",
"socket": {},
"url": "http://localhost:3000"
},
"cli": {
"badgeMessages": [],
"bannerColor": "green"
},
"generate": {
"dir": "/<rootDir>/dist",
"routes": [],
"exclude": [],
"concurrency": 500,
"interval": 0,
"subFolders": true,
"fallback": "200.html",
"crawler": true,
"manifest": true,
"nojekyll": true,
"cache": {
"ignore": [],
"globbyOptions": {
"gitignore": true
}
},
"staticAssets": {
"dir": "static",
"base": "/_nuxt/<rootDir>/dist",
"versionBase": "",
"version": "1666118993"
}
}
}

@@ -38,14 +38,2 @@

## `config`
### `silent`
- **Type**: `boolean`
- **Default**: `true`
### `performance`
- **Type**: `boolean`
- **Default**: `false`
## `compilerOptions`

@@ -77,9 +65,2 @@ - **Type**: `@vueCompilerCoreCompilerOptions`

## `assetsPath`
- **Type**: `any`
- **Default**: `{}`
> The folder name for the built site assets, relative to `baseURL` (or `cdnURL` if set).
## `cdnURL`

@@ -98,23 +79,19 @@ - **Type**: `string`

## `layoutTransition`
- **Type**: `SrcTypesConfigNuxtAppConfig['layoutTransition']`
- **Default**: `false`
### `name`
- **Type**: `string`
- **Default**: `"layout"`
> Default values for layout transitions.
### `mode`
- **Type**: `string`
- **Default**: `"out-in"`
This can be overridden with `definePageMeta` on an individual page. Only JSON-serializable values are allowed.
## `pageTransition`
- **Type**: `SrcTypesConfigNuxtAppConfig['pageTransition']`
- **Default**: `false`
### `name`
- **Type**: `string`
- **Default**: `"page"`
> Default values for page transitions.
### `mode`
- **Type**: `string`
- **Default**: `"out-in"`
This can be overridden with `definePageMeta` on an individual page. Only JSON-serializable values are allowed.

@@ -132,94 +109,2 @@

# `appTemplatePath`
- **Type**: `string`
- **Default**: `"/<rootDir>/.nuxt/views/app.template.html"`
> The path to an HTML template file for rendering Nuxt responses. Uses `<srcDir>/app.html` if it exists, or the Nuxt's default template if not.
# `store`
- **Type**: `boolean`
- **Default**: `false`
> Enable or disable Vuex store.
By default, it is enabled if there is a `store/` directory.
# `vueMeta`
- **Type**: `VueMetaVueMetaOptions`
- **Default**: `null`
> Options to pass directly to `vue-meta`.
# `head`
## `meta`
- **Type**: `array`
- **Default**: `[]`
> Each item in the array maps to a newly-created `<meta>` element, where object properties map to attributes.
## `link`
- **Type**: `array`
- **Default**: `[]`
> Each item in the array maps to a newly-created `<link>` element, where object properties map to attributes.
## `style`
- **Type**: `array`
- **Default**: `[]`
> Each item in the array maps to a newly-created `<style>` element, where object properties map to attributes.
## `script`
- **Type**: `array`
- **Default**: `[]`
> Each item in the array maps to a newly-created `<script>` element, where object properties map to attributes.
# `meta`
## `meta`
- **Type**: `array`
- **Default**: `[]`
## `link`
- **Type**: `array`
- **Default**: `[]`
## `style`
- **Type**: `array`
- **Default**: `[]`
## `script`
- **Type**: `array`
- **Default**: `[]`
# `fetch`
## `server`
- **Type**: `boolean`
- **Default**: `true`
> Whether to enable `fetch()` on the server.
## `client`
- **Type**: `boolean`
- **Default**: `true`
> Whether to enable `fetch()` on the client.
# `plugins`

@@ -236,9 +121,2 @@ - **Type**: `(SrcTypesNuxtNuxtPlugin | string)[]`

# `extendPlugins`
- **Type**: `(plugins: Array<{ src: string, mode?: 'client' | 'server' }>) => Array<{ src: string, mode?: 'client' | 'server' }>`
- **Default**: `null`
> You may want to extend plugins or change their order. For this, you can pass a function using `extendPlugins`. It accepts an array of plugin objects and should return an array of plugin objects.
# `css`

@@ -254,179 +132,43 @@ - **Type**: `string[]`

# `layouts`
- **Type**: `Record<string, string>`
- **Default**: `{}`
# `builder`
- **Type**: `'vite' | 'webpack' | { bundle: (nuxt: SrcTypesNuxtNuxt) => Promise<void> }`
- **Default**: `"@nuxt/vite-builder"`
> An object where each key name maps to a path to a layout .vue file.
> The builder to use for bundling the Vue part of your application.
Normally, there is no need to configure this directly.
# `sourcemap`
# `build`
# `ErrorPage`
- **Type**: `string`
- **Default**: `null`
## `transpile`
- **Type**: `Array<string | RegExp | Function>`
- **Default**: `[]`
> Set a custom error page layout.
> If you want to transpile specific dependencies with Babel, you can add them here. Each item in transpile can be a package name, a function, a string or regex object matching the dependency's file name.
Normally, there is no need to configure this directly.
You can also use a function to conditionally transpile. The function will receive an object ({ isDev, isServer, isClient, isModern, isLegacy }).
# `loading`
## `templates`
- **Type**: `array`
- **Default**: `[]`
## `color`
- **Type**: `string`
- **Default**: `"black"`
> You can provide your own templates which will be rendered based on Nuxt configuration. This feature is specially useful for using with modules.
> CSS color of the progress bar.
Templates are rendered using [`lodash.template`](https://lodash.com/docs/4.17.15#template).
## `failedColor`
- **Type**: `string`
- **Default**: `"red"`
> CSS color of the progress bar when an error appended while rendering the route (if data or fetch sent back an error, for example).
## `height`
- **Type**: `string`
- **Default**: `"2px"`
> Height of the progress bar (used in the style property of the progress bar).
## `throttle`
- **Type**: `number`
- **Default**: `200`
> In ms, wait for the specified time before displaying the progress bar. Useful for preventing the bar from flashing.
## `duration`
- **Type**: `number`
- **Default**: `5000`
> In ms, the maximum duration of the progress bar, Nuxt assumes that the route will be rendered before 5 seconds.
## `continuous`
- **Type**: `boolean`
## `analyze`
- **Type**: `boolean | WebpackBundleAnalyzerBundleAnalyzerPluginOptions | RollupPluginVisualizerPluginVisualizerOptions`
- **Default**: `false`
> Keep animating progress bar when loading takes longer than duration.
> Nuxt uses `webpack-bundle-analyzer` to visualize your bundles and how to optimize them.
## `rtl`
- **Type**: `boolean`
- **Default**: `false`
Set to `true` to enable bundle analysis, or pass an object with options: [for webpack](https://github.com/webpack-contrib/webpack-bundle-analyzer#options-for-plugin) or [for vite](https://github.com/btd/rollup-plugin-visualizer#options).
> Set the direction of the progress bar from right to left.
## `css`
- **Type**: `boolean`
- **Default**: `true`
> Set to `false` to remove default progress bar styles (and add your own).
# `loadingIndicator`
# `pageTransition`
# `layoutTransition`
# `features`
## `store`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable Nuxt vuex integration
## `layouts`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable layouts
## `meta`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable Nuxt integration with `vue-meta` and the `head` property
## `middleware`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable middleware
## `transitions`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable transitions
## `deprecations`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable support for deprecated features and aliases
## `validate`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable the Nuxt `validate()` hook
## `useAsyncData`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable the Nuxt `asyncData()` hook
## `fetch`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable the Nuxt `fetch()` hook
## `clientOnline`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable `$nuxt.isOnline`
## `clientPrefetch`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable prefetching behavior in `<NuxtLink>`
## `componentAliases`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable extra component aliases like `<NLink>` and `<NChild>`
## `componentClientOnly`
- **Type**: `boolean`
- **Default**: `true`
> Set to false to disable the `<ClientOnly>` component (see [docs](https://github.com/egoist/vue-client-only))
# `extends`

@@ -506,2 +248,13 @@ - **Type**: `string|string[]`

# `modulesDir`
- **Type**: `array`
- **Default**: `["/<rootDir>/node_modules","/Users/pooya/Code/framework/packages/schema/node_modules"]`
> Used to set the modules directories for path resolving (for example, webpack's `resolveLoading`, `nodeExternals` and `postcss`).
The configuration path is relative to `options.rootDir` (default is current working directory).
Setting this field may be necessary if your project is organized as a yarn workspace-styled mono-repository.
# `dev`

@@ -534,25 +287,2 @@ - **Type**: `boolean`

# `env`
# `createRequire`
- **Type**: `'jiti' | 'native' | ((p: string | { filename: string }) => NodeRequire)`
- **Default**: `undefined`
> Set the method Nuxt uses to require modules, such as loading `nuxt.config`, server middleware, and so on - defaulting to `jiti` (which has support for TypeScript and ESM syntax).
```ts
() => any
```
# `target`
- **Type**: `'server' | 'static'`
- **Default**: `"server"`
> Whether your Nuxt app should be built to be served by the Nuxt server (`server`) or as static HTML files suitable for a CDN or other static file server (`static`).
This is unrelated to `ssr`.
# `ssr`

@@ -565,20 +295,2 @@ - **Type**: `boolean`

# `mode`
- **Type**: `string`
- **Default**: `"spa"`
# `modern`
- **Type**: `'server' | 'client' | boolean`
- **Default**: `{}`
> Whether to produce a separate modern build targeting browsers that support ES modules.
Set to `'server'` to enable server mode, where the Nuxt server checks browser version based on the user agent and serves the correct bundle.
Set to `'client'` to serve both the modern bundle with `<script type="module">` and the legacy bundle with `<script nomodule>`. It will also provide a `<link rel="modulepreload">` for the modern bundle. Every browser that understands the module type will load the modern bundle while older browsers fall back to the legacy (transpiled) bundle.
If you have set `modern: true` and are generating your app or have `ssr: false`, modern will be set to `'client'`.
If you have set `modern: true` and are serving your app, modern will be set to `'server'`.
# `modules`

@@ -596,115 +308,6 @@ - **Type**: `(SrcTypesModuleNuxtModule | string | [SrcTypesModuleNuxtModule | string, Record<string, any>])[]`

# `buildModules`
- **Type**: `(SrcTypesModuleNuxtModule | string | [SrcTypesModuleNuxtModule | string, Record<string, any>])[]`
- **Default**: `[]`
> Modules that are only required during development and build time.
Modules are Nuxt extensions which can extend its core functionality and add endless integrations.
Each module is either a string (which can refer to a package, or be a path to a file), a tuple with the module as first string and the options as a second object, or an inline module function.
Nuxt tries to resolve each item in the modules array using node require path (in `node_modules`) and then will be resolved from project `srcDir` if `~` alias is used.
# `_modules`
- **Type**: `array`
- **Default**: `[]`
> Built-in ad-hoc modules.
@private
# `_installedModules`
- **Type**: `array`
- **Default**: `[]`
> Installed module metadata.
# `globalName`
- **Type**: `string`
- **Default**: `"nuxt"`
> Allows customizing the global ID used in the main HTML template as well as the main Vue instance name and other options.
# `globals`
## `id`
- **Type**: `(globalName: string) => string`
- **Default**: `undefined`
```ts
() => any
```
## `nuxt`
- **Type**: `(globalName: string) => string`
- **Default**: `undefined`
```ts
() => any
```
## `context`
- **Type**: `(globalName: string) => string`
- **Default**: `undefined`
```ts
() => any
```
## `pluginPrefix`
- **Type**: `(globalName: string) => string`
- **Default**: `undefined`
```ts
() => any
```
## `readyCallback`
- **Type**: `(globalName: string) => string`
- **Default**: `undefined`
```ts
() => any
```
## `loadedCallback`
- **Type**: `(globalName: string) => string`
- **Default**: `undefined`
```ts
() => any
```
# `serverMiddleware`
- **Type**: `array`
- **Default**: `[]`
> Server middleware are connect/express/h3-shaped functions that handle server-side requests. They run on the server and before the Vue renderer.
By adding entries to `serverMiddleware` you can register additional routes without the need for an external server.
You can pass a string, which can be the name of a node dependency or a path to a file. You can also pass an object with `path` and `handler` keys (`handler` can be a path or a function).
# `modulesDir`
- **Type**: `array`
- **Default**: `["/<rootDir>/node_modules","/Users/pooya/Code/framework/packages/schema/node_modules"]`
> Used to set the modules directories for path resolving (for example, webpack's `resolveLoading`, `nodeExternals` and `postcss`).
The configuration path is relative to `options.rootDir` (default is current working directory).
Setting this field may be necessary if your project is organized as a yarn workspace-styled mono-repository.
# `dir`

@@ -719,9 +322,2 @@

## `app`
- **Type**: `string`
- **Default**: `"app"`
> The directory containing app template files like `app.html` and `router.scrollBehavior.js`
## `layouts`

@@ -767,9 +363,2 @@ - **Type**: `string`

## `store`
- **Type**: `string`
- **Default**: `"store"`
> The folder which will be used to auto-generate your Vuex store structure.
# `extensions`

@@ -782,9 +371,2 @@ - **Type**: `array`

# `styleExtensions`
- **Type**: `array`
- **Default**: `[".css",".pcss",".postcss",".styl",".stylus",".scss",".sass",".less"]`
> The style extensions that should be resolved by the Nuxt resolver (for example, in `css` property).
# `alias`

@@ -813,12 +395,2 @@

# `watch`
- **Type**: `string[]`
- **Default**: `[]`
> The watch property lets you watch custom files for restarting the server.
`chokidar` is used to set up the watchers. To learn more about its pattern options, see chokidar documentation.
# `watchers`

@@ -847,9 +419,2 @@

# `editor`
- **Type**: `string`
- **Default**: `undefined`
> Your preferred code editor to launch when debugging.
# `hooks`

@@ -888,2 +453,134 @@ - **Type**: `SrcTypesHooksNuxtHooks`

# `devServer`
## `https`
- **Type**: `false | { key: string; cert: string }`
- **Default**: `false`
> Whether to enable HTTPS.
## `port`
- **Type**: `number`
- **Default**: `3000`
> Dev server listening port
## `host`
- **Type**: `string`
- **Default**: `"localhost"`
> Dev server listening host
## `url`
- **Type**: `string`
- **Default**: `"http://localhost:3000"`
> Listening dev server url
# `experimental`
## `asyncEntry`
- **Type**: `boolean`
- **Default**: `false`
> Set to true to generate an async entry point for the Vue bundle (for module federation support).
## `reactivityTransform`
- **Type**: `boolean`
- **Default**: `false`
> Enable Vue's reactivity transform
## `externalVue`
- **Type**: `boolean`
- **Default**: `true`
> Externalize `vue`, `@vue/*` and `vue-router` when building.
## `treeshakeClientOnly`
- **Type**: `boolean`
- **Default**: `true`
> Tree shakes contents of client-only components from server bundle.
## `viteNode`
- **Type**: `boolean`
- **Default**: `true`
> Use vite-node for on-demand server chunk loading
## `viteServerDynamicImports`
- **Type**: `boolean`
- **Default**: `true`
> Split server bundle into multiple chunks and dynamically import them.
## `inlineSSRStyles`
- **Type**: `boolean | ((id?: string) => boolean)`
- **Default**: `true`
> Inline styles when rendering HTML (currently vite only).
You can also pass a function that receives the path of a Vue component and returns a boolean indicating whether to inline the styles for that component.
## `noScripts`
- **Type**: `boolean`
- **Default**: `false`
> Turn off rendering of Nuxt scripts and JS resource hints.
## `payloadExtraction`
- **Type**: `boolean`
- **Default**: `true`
> When this option is enabled (by default) payload of pages generated with `nuxt generate` are extracted
## `crossOriginPrefetch`
- **Type**: `boolean`
- **Default**: `false`
> Enable cross-origin prefetch using the Speculation Rules API.
## `writeEarlyHints`
- **Type**: `boolean`
- **Default**: `false`
> Write early hints when using node server.
# `generate`
## `routes`
- **Type**: `array`
- **Default**: `[]`
> The routes to generate.
If you are using the crawler, this will be only the starting point for route generation. This is often necessary when using dynamic routes.
It can be an array or a function.
## `exclude`
- **Type**: `array`
- **Default**: `[]`
> An array of string or regular expressions that will prevent generation of routes matching them. The routes will still be accessible when `fallback` is set.
# `_majorVersion`

@@ -944,2 +641,40 @@ - **Type**: `number`

# `_installedModules`
- **Type**: `array`
- **Default**: `[]`
# `_modules`
- **Type**: `array`
- **Default**: `[]`
# `nitro`
## `routeRules`
# `routeRules`
- **Type**: `NitropackNitroConfig['routeRules']`
- **Default**: `{}`
> Global route options applied to matching server routes.
# `serverHandlers`
- **Type**: `NitropackNitroEventHandler[]`
- **Default**: `[]`
> Nitro server handlers.
Each handler accepts the following options: - handler: The path to the file defining the handler. - route: The route under which the handler is available. This follows the conventions of https://github.com/unjs/radix3. - method: The HTTP method of requests that should be handled. - middleware: Specifies whether it is a middleware handler. - lazy: Specifies whether to use lazy loading to import the handler.
# `devServerHandlers`
- **Type**: `NitropackNitroDevEventHandler[]`
- **Default**: `[]`
> Nitro development-only server handlers.
# `postcss`

@@ -977,2 +712,15 @@

# `router`
## `options`
- **Type**: `SrcTypesRouterRouterConfigSerializable`
- **Default**: `{}`
> Additional options passed to `vue-router`.
Note: Only JSON serializable options should be passed by nuxt config.
For more control, you can use `app/router.options.ts` file.
# `typescript`

@@ -982,3 +730,3 @@

- **Type**: `boolean`
- **Default**: `false`
- **Default**: `true`

@@ -1002,3 +750,3 @@ > TypeScript comes with certain checks to give you more safety and analysis of your program. Once you’ve converted your codebase to TypeScript, you can start enabling these checks for greater safety. [Read More](https://www.typescriptlang.org/docs/handbook/migrating-from-javascript.html#getting-stricter-checks)

If set to true, this will type check in development. You can restrict this to build-time type checking by setting it to `build`.
If set to true, this will type check in development. You can restrict this to build-time type checking by setting it to `build`. Requires to install `typescript` and `vue-tsc` as dev dependencies.

@@ -1020,3 +768,3 @@

We recommend instead either enabling [**Take Over Mode**](https://github.com/johnsoncodehk/volar/discussions/471) or adding **TypeScript Vue Plugin (Volar)** 👉 [[Download](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin)].
We recommend instead either enabling [**Take Over Mode**](https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode) or adding TypeScript Vue Plugin (Volar)** 👉 [[Download](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin)].

@@ -1111,10 +859,5 @@

#### `strict`
- **Type**: `boolean`
- **Default**: `false`
#### `allow`
- **Type**: `array`
- **Default**: `["/<rootDir>/.nuxt","/<rootDir>","/<rootDir>","/<rootDir>/node_modules","/Users/pooya/Code/framework/packages/schema/node_modules"]`
- **Default**: `["/<rootDir>/.nuxt","/<rootDir>","/<rootDir>","/<rootDir>","/<rootDir>/node_modules","/Users/pooya/Code/framework/packages/schema/node_modules"]`

@@ -1507,1268 +1250,1 @@

> Filters to hide build warnings.
# `nitro`
## `routeRules`
# `routeRules`
- **Type**: `NitropackNitroConfig['routeRules']`
- **Default**: `{}`
> Global route options applied to matching server routes.
# `serverHandlers`
- **Type**: `NitropackNitroEventHandler[]`
- **Default**: `[]`
> Nitro server handlers.
Each handler accepts the following options: - handler: The path to the file defining the handler. - route: The route under which the handler is available. This follows the conventions of https://github.com/unjs/radix3. - method: The HTTP method of requests that should be handled. - middleware: Specifies whether it is a middleware handler. - lazy: Specifies whether to use lazy loading to import the handler.
# `devServerHandlers`
- **Type**: `NitropackNitroDevEventHandler[]`
- **Default**: `[]`
> Nitro development-only server handlers.
# `experimental`
## `asyncEntry`
- **Type**: `boolean`
- **Default**: `false`
> Set to true to generate an async entry point for the Vue bundle (for module federation support).
## `reactivityTransform`
- **Type**: `boolean`
- **Default**: `false`
> Enable Vue's reactivity transform
## `externalVue`
- **Type**: `boolean`
- **Default**: `true`
> Externalize `vue`, `@vue/*` and `vue-router` when building.
## `treeshakeClientOnly`
- **Type**: `boolean`
- **Default**: `true`
> Tree shakes contents of client-only components from server bundle.
## `viteNode`
- **Type**: `boolean`
- **Default**: `true`
> Use vite-node for on-demand server chunk loading
## `viteServerDynamicImports`
- **Type**: `boolean`
- **Default**: `true`
> Split server bundle into multiple chunks and dynamically import them.
## `inlineSSRStyles`
- **Type**: `boolean | ((id?: string) => boolean)`
- **Default**: `true`
> Inline styles when rendering HTML (currently vite only).
You can also pass a function that receives the path of a Vue component and returns a boolean indicating whether to inline the styles for that component.
## `noScripts`
- **Type**: `boolean`
- **Default**: `false`
> Turn off rendering of Nuxt scripts and JS resource hints.
## `payloadExtraction`
- **Type**: `boolean`
- **Default**: `true`
> When this option is enabled (by default) payload of pages generated with `nuxt generate` are extracted
## `crossOriginPrefetch`
- **Type**: `boolean`
- **Default**: `false`
> Enable cross-origin prefetch using the Speculation Rules API.
## `writeEarlyHints`
- **Type**: `boolean`
- **Default**: `true`
> Write early hints when using node server
# `builder`
- **Type**: `'vite' | 'webpack' | { bundle: (nuxt: SrcTypesNuxtNuxt) => Promise<void> }`
- **Default**: `"@nuxt/vite-builder"`
> The builder to use for bundling the Vue part of your application.
# `sourcemap`
# `build`
## `quiet`
- **Type**: `boolean`
- **Default**: `false`
> Suppresses most of the build output log.
It is enabled by default when a CI or test environment is detected.
## `analyze`
- **Type**: `boolean | WebpackBundleAnalyzerBundleAnalyzerPluginOptions | RollupPluginVisualizerPluginVisualizerOptions`
- **Default**: `false`
> Nuxt uses `webpack-bundle-analyzer` to visualize your bundles and how to optimize them.
Set to `true` to enable bundle analysis, or pass an object with options: [for webpack](https://github.com/webpack-contrib/webpack-bundle-analyzer#options-for-plugin) or [for vite](https://github.com/btd/rollup-plugin-visualizer#options).
## `profile`
- **Type**: `boolean`
- **Default**: `false`
> Enable the profiler in webpackbar.
It is normally enabled by CLI argument `--profile`.
## `extractCSS`
- **Type**: `boolean`
- **Default**: `false`
> Enables Common CSS Extraction using [Vue Server Renderer guidelines](https://ssr.vuejs.org/guide/css.html).
Using [extract-css-chunks-webpack-plugin](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/) under the hood, your CSS will be extracted into separate files, usually one per component. This allows caching your CSS and JavaScript separately and is worth trying if you have a lot of global or shared CSS.
## `cssSourceMap`
- **Type**: `boolean`
- **Default**: `false`
> Enables CSS source map support (defaults to true in development)
## `ssr`
- **Type**: `any`
- **Default**: `{}`
> Creates special webpack bundle for SSR renderer. It is normally not necessary to change this value.
## `parallel`
- **Type**: `boolean`
- **Default**: `false`
> Enable [thread-loader](https://github.com/webpack-contrib/thread-loader#thread-loader) when building app with webpack.
## `cache`
- **Type**: `boolean`
- **Default**: `false`
> Enable caching for [`terser-webpack-plugin`](https://github.com/webpack-contrib/terser-webpack-plugin#options) and [`cache-loader`](https://github.com/webpack-contrib/cache-loader#cache-loader).
## `standalone`
- **Type**: `boolean`
- **Default**: `false`
> Inline server bundle dependencies.
This mode bundles `node_modules` that are normally preserved as externals in the server build.
## `publicPath`
- **Type**: `any`
- **Default**: `{}`
> If you are uploading your dist files to a CDN, you can set the publicPath to your CDN.
## `serverURLPolyfill`
- **Type**: `string`
- **Default**: `"url"`
> The polyfill library to load to provide URL and URLSearchParams.
Defaults to `'url'` ([see package](https://www.npmjs.com/package/url)).
## `filenames`
### `app`
- **Type**: `function`
- **Default**: `undefined`
```ts
() => any
```
### `chunk`
- **Type**: `function`
- **Default**: `undefined`
```ts
() => any
```
### `css`
- **Type**: `function`
- **Default**: `undefined`
```ts
() => any
```
### `img`
- **Type**: `function`
- **Default**: `undefined`
```ts
() => any
```
### `font`
- **Type**: `function`
- **Default**: `undefined`
```ts
() => any
```
### `video`
- **Type**: `function`
- **Default**: `undefined`
```ts
() => any
```
## `loaders`
### `file`
#### `esModule`
- **Type**: `boolean`
- **Default**: `false`
### `fontUrl`
#### `esModule`
- **Type**: `boolean`
- **Default**: `false`
#### `limit`
- **Type**: `number`
- **Default**: `1000`
### `imgUrl`
#### `esModule`
- **Type**: `boolean`
- **Default**: `false`
#### `limit`
- **Type**: `number`
- **Default**: `1000`
### `pugPlain`
- **Type**: `any`
- **Default**: `{}`
### `vue`
#### `productionMode`
- **Type**: `boolean`
- **Default**: `true`
#### `transformAssetUrls`
##### `video`
- **Type**: `string`
- **Default**: `"src"`
##### `source`
- **Type**: `string`
- **Default**: `"src"`
##### `object`
- **Type**: `string`
- **Default**: `"src"`
##### `embed`
- **Type**: `string`
- **Default**: `"src"`
#### `compilerOptions`
### `css`
#### `importLoaders`
- **Type**: `number`
- **Default**: `0`
#### `esModule`
- **Type**: `boolean`
- **Default**: `false`
### `cssModules`
#### `importLoaders`
- **Type**: `number`
- **Default**: `0`
#### `esModule`
- **Type**: `boolean`
- **Default**: `false`
#### `modules`
##### `localIdentName`
- **Type**: `string`
- **Default**: `"[local]_[hash:base64:5]"`
### `less`
- **Type**: `any`
- **Default**: `{"sourcemap":false}`
### `sass`
#### `sassOptions`
##### `indentedSyntax`
- **Type**: `boolean`
- **Default**: `true`
### `scss`
- **Type**: `any`
- **Default**: `{"sourcemap":false}`
### `stylus`
- **Type**: `any`
- **Default**: `{"sourcemap":false}`
### `vueStyle`
- **Type**: `any`
- **Default**: `{"sourcemap":false}`
## `styleResources`
- **Type**: `any`
- **Default**: `{}`
## `plugins`
- **Type**: `array`
- **Default**: `[]`
> Add webpack plugins.
## `terser`
- **Type**: `any`
- **Default**: `{}`
> Terser plugin options.
Set to false to disable this plugin, or pass an object of options.
## `hardSource`
- **Type**: `boolean`
- **Default**: `false`
> Enables the [HardSourceWebpackPlugin](https://github.com/mzgoddard/hard-source-webpack-plugin) for improved caching.
## `aggressiveCodeRemoval`
- **Type**: `boolean`
- **Default**: `false`
> Hard-replaces `typeof process`, `typeof window` and `typeof document` to tree-shake bundle.
## `optimizeCSS`
- **Type**: `boolean`
- **Default**: `false`
> OptimizeCSSAssets plugin options.
Defaults to true when `extractCSS` is enabled.
## `optimization`
### `runtimeChunk`
- **Type**: `string`
- **Default**: `"single"`
### `minimize`
- **Type**: `boolean`
- **Default**: `true`
> Set minimize to false to disable all minimizers. (It is disabled in development by default)
### `minimizer`
- **Type**: `any`
- **Default**: `{}`
> You can set minimizer to a customized array of plugins.
### `splitChunks`
#### `chunks`
- **Type**: `string`
- **Default**: `"all"`
#### `automaticNameDelimiter`
- **Type**: `string`
- **Default**: `"/"`
#### `cacheGroups`
- **Type**: `any`
- **Default**: `{}`
## `splitChunks`
### `layouts`
- **Type**: `boolean`
- **Default**: `false`
### `pages`
- **Type**: `boolean`
- **Default**: `true`
### `commons`
- **Type**: `boolean`
- **Default**: `true`
## `corejs`
- **Type**: `string`
- **Default**: `"auto"`
> Nuxt will automatically detect the current version of `core-js` in your project (`'auto'`), or you can specify which version you want to use (`2` or `3`).
## `babel`
### `configFile`
- **Type**: `boolean`
- **Default**: `false`
### `babelrc`
- **Type**: `boolean`
- **Default**: `false`
### `plugins`
- **Type**: `array`
- **Default**: `[]`
> An array of Babel plugins to load, or a function that takes webpack context and returns an array of Babel plugins.
For more information see [Babel plugins options](https://babeljs.io/docs/en/options#plugins) and [babel-loader options](https://github.com/babel/babel-loader#options).
### `presets`
- **Type**: `any`
- **Default**: `{}`
> The Babel presets to be applied.
### `cacheDirectory`
- **Type**: `boolean`
- **Default**: `false`
## `transpile`
- **Type**: `Array<string | RegExp | Function>`
- **Default**: `[]`
> If you want to transpile specific dependencies with Babel, you can add them here. Each item in transpile can be a package name, a function, a string or regex object matching the dependency's file name.
You can also use a function to conditionally transpile. The function will receive an object ({ isDev, isServer, isClient, isModern, isLegacy }).
## `postcss`
### `execute`
- **Type**: `undefined`
- **Default**: `undefined`
### `postcssOptions`
### `sourcemap`
- **Type**: `undefined`
- **Default**: `undefined`
### `implementation`
- **Type**: `undefined`
- **Default**: `undefined`
### `order`
- **Type**: `string`
- **Default**: `""`
## `html`
### `minify`
#### `collapseBooleanAttributes`
- **Type**: `boolean`
- **Default**: `true`
#### `decodeEntities`
- **Type**: `boolean`
- **Default**: `true`
#### `minifyCSS`
- **Type**: `boolean`
- **Default**: `true`
#### `minifyJS`
- **Type**: `boolean`
- **Default**: `true`
#### `processConditionalComments`
- **Type**: `boolean`
- **Default**: `true`
#### `removeEmptyAttributes`
- **Type**: `boolean`
- **Default**: `true`
#### `removeRedundantAttributes`
- **Type**: `boolean`
- **Default**: `true`
#### `trimCustomFragments`
- **Type**: `boolean`
- **Default**: `true`
#### `useShortDoctype`
- **Type**: `boolean`
- **Default**: `true`
## `template`
- **Type**: `any`
- **Default**: `{}`
> Allows setting a different app template (other than `@nuxt/vue-app`)
## `templates`
- **Type**: `array`
- **Default**: `[]`
> You can provide your own templates which will be rendered based on Nuxt configuration. This feature is specially useful for using with modules.
Templates are rendered using [`lodash.template`](https://lodash.com/docs/4.17.15#template).
## `watch`
- **Type**: `array`
- **Default**: `[]`
> You can provide your custom files to watch and regenerate after changes.
This feature is especially useful for using with modules.
## `devMiddleware`
### `stats`
- **Type**: `string`
- **Default**: `"none"`
## `hotMiddleware`
- **Type**: `any`
- **Default**: `{}`
> See [webpack-hot-middleware](https://github.com/webpack-contrib/webpack-hot-middleware) for available options.
## `vendor`
### `$meta`
#### `deprecated`
- **Type**: `string`
- **Default**: `"vendor has been deprecated since nuxt 2"`
## `stats`
### `excludeAssets`
- **Type**: `array`
- **Default**: `[{},{},{}]`
## `friendlyErrors`
- **Type**: `boolean`
- **Default**: `true`
> Set to `false` to disable the overlay provided by [FriendlyErrorsWebpackPlugin](https://github.com/nuxt/friendly-errors-webpack-plugin).
## `additionalExtensions`
- **Type**: `array`
- **Default**: `[]`
> Additional extensions (beyond `['vue', 'js']` to support in `pages/`, `layouts/`, `middleware/`, etc.)
## `warningIgnoreFilters`
- **Type**: `array`
- **Default**: `[]`
> Filters to hide build warnings.
## `followSymlinks`
- **Type**: `boolean`
- **Default**: `false`
> Set to true to scan files within symlinks in the build (such as within `pages/`).
# `messages`
## `loading`
- **Type**: `string`
- **Default**: `"Loading..."`
> The text that displays on the Nuxt loading indicator when `ssr: false`.
## `error_404`
- **Type**: `string`
- **Default**: `"This page could not be found"`
> The 404 text on the default Nuxt error page.
## `server_error`
- **Type**: `string`
- **Default**: `"Server error"`
> The text to display on the default Nuxt error page when there has been a server error.
## `nuxtjs`
- **Type**: `string`
- **Default**: `"Nuxt"`
> The text (linked to nuxtjs.org) that appears on the built-in Nuxt error page.
## `back_to_home`
- **Type**: `string`
- **Default**: `"Back to the home page"`
> The text (linked to the home page) that appears on the built-in Nuxt error page.
## `server_error_details`
- **Type**: `string`
- **Default**: `"An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details."`
> The message that will display on a white screen if the built-in Nuxt error page can't be rendered.
## `client_error`
- **Type**: `string`
- **Default**: `"Error"`
> The default error title (if there isn't a specific error message) on the built-in Nuxt error page.
## `client_error_details`
- **Type**: `string`
- **Default**: `"An error occurred while rendering the page. Check developer tools console for details."`
> The error message (in debug mode) on the built-in Nuxt error page.
# `render`
## `bundleRenderer`
### `shouldPrefetch`
- **Type**: `function`
- **Default**: `undefined`
```ts
() => any
```
### `shouldPreload`
- **Type**: `function`
- **Default**: `undefined`
```ts
() => any
```
### `runInNewContext`
- **Type**: `boolean`
- **Default**: `false`
> enabled by default for development
## `crossorigin`
- **Type**: `any`
- **Default**: `{}`
> Configure the crossorigin attribute on `<link rel="stylesheet">` and `<script>` tags in generated HTML. [More information](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).
## `resourceHints`
- **Type**: `boolean`
- **Default**: `true`
> Adds prefetch and preload links for faster initial page load time. You probably don't want to disable this option unless you have many pages and routes.
## `ssr`
- **Type**: `any`
- **Default**: `{}`
> Whether to enable rendering of HTML - either dynamically (in server mode) or at generate time.
This option is automatically set based on global SSR value if not provided. This can be useful to dynamically enable/disable SSR at runtime after image builds (with docker, for example).
## `ssrLog`
- **Type**: `boolean`
- **Default**: `false`
> Forward server-side logs to the browser for better debugging (only available in development).
Set to `collapsed` to collapse the logs, or `false` to disable.
## `http2`
### `push`
- **Type**: `boolean`
- **Default**: `false`
> Set to true to enable HTTP2 push headers.
### `shouldPush`
- **Type**: `any`
- **Default**: `null`
### `pushAssets`
- **Type**: `any`
- **Default**: `null`
> You can control what links to push using this function. It receives `req`, `res`, `publicPath` and a `preloadFiles` array.
You can add your own assets to the array as well. Using `req` and `res` you can decide what links to push based on the request headers, for example using the cookie with application version.
Assets will be joined together with `,` and passed as a single `Link` header.
## `static`
### `prefix`
- **Type**: `boolean`
- **Default**: `true`
> Whether to add the router base to your static assets.
## `compressor`
### `threshold`
- **Type**: `number`
- **Default**: `0`
## `etag`
### `hash`
- **Type**: `boolean`
- **Default**: `false`
### `weak`
- **Type**: `boolean`
- **Default**: `false`
## `csp`
- **Type**: `boolean`
- **Default**: `false`
> Use this to configure Content-Security-Policy to load external resources. [Read more](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
Set to `true` to enable, or you can pass options to fine-tune your CSP options.
**Prerequisites**: These CSP settings are only effective when using Nuxt with `mode: 'server'` to serve your SSR application.
**Updating settings**: These settings are read by the Nuxt server directly from `nuxt.config`. This means changes to these settings take effect when the server is restarted. There is no need to rebuild the application to update CSP settings.
## `dist`
### `index`
- **Type**: `boolean`
- **Default**: `false`
### `maxAge`
- **Type**: `string`
- **Default**: `"1y"`
## `fallback`
### `dist`
- **Type**: `any`
- **Default**: `{}`
> For routes matching the publicPath (`/_nuxt/*`). Disable by setting to `false`.
### `static`
#### `skipUnknown`
- **Type**: `boolean`
- **Default**: `true`
#### `handlers`
##### `.htm`
- **Type**: `boolean`
- **Default**: `false`
##### `.html`
- **Type**: `boolean`
- **Default**: `false`
# `router`
## `options`
- **Type**: `SrcTypesRouterRouterConfigSerializable`
- **Default**: `{}`
> Additional options passed to `vue-router`.
Note: Only JSON serializable options should be passed by nuxt config.
For more control, you can use `app/router.optionts.ts` file.
## `mode`
- **Type**: `string`
- **Default**: `"history"`
> Configure the router mode.
For server-side rendering it is not recommended to change it.
## `base`
- **Type**: `string`
- **Default**: `"/"`
> The base URL of the app. For example, if the entire single page application is served under `/app/`, then base should use the value `'/app/'`.
This can be useful if you need to serve Nuxt as a different context root, from within a bigger web site.
## `_routerBaseSpecified`
- **Type**: `boolean`
- **Default**: `true`
## `routes`
- **Type**: `array`
- **Default**: `[]`
## `routeNameSplitter`
- **Type**: `string`
- **Default**: `"-"`
> This allows changing the separator between route names that Nuxt uses.
Imagine we have the page file `pages/posts/_id.vue`. Nuxt will generate the route name programmatically, in this case `posts-id`. If you change the routeNameSplitter config to `/` the name will change to `posts/id`.
## `middleware`
- **Type**: `array`
- **Default**: `[]`
> Set the default(s) middleware for every page of the application.
## `linkActiveClass`
- **Type**: `string`
- **Default**: `"nuxt-link-active"`
> Globally configure `<nuxt-link>` default active class.
## `linkExactActiveClass`
- **Type**: `string`
- **Default**: `"nuxt-link-exact-active"`
> Globally configure `<nuxt-link>` default exact active class.
## `linkPrefetchedClass`
- **Type**: `boolean`
- **Default**: `false`
> Globally configure `<nuxt-link>` default prefetch class (feature disabled by default).
## `extendRoutes`
- **Type**: `any`
- **Default**: `null`
> You can pass a function to extend the routes created by Nuxt.
## `scrollBehavior`
- **Type**: `any`
- **Default**: `{}`
> The `scrollBehavior` option lets you define a custom behavior for the scroll position between the routes. This method is called every time a page is rendered. To learn more about it, see the `vue-router` documentation.
## `parseQuery`
- **Type**: `boolean`
- **Default**: `false`
> Provide custom query string parse function. Overrides the default.
## `stringifyQuery`
- **Type**: `boolean`
- **Default**: `false`
> Provide custom query string stringify function. Overrides the default.
## `fallback`
- **Type**: `boolean`
- **Default**: `false`
> Controls whether the router should fall back to hash mode when the browser does not support history.pushState, but mode is set to history.
Setting this to `false` essentially makes every router-link navigation a full page refresh in IE9. This is useful when the app is server-rendered and needs to work in IE9, because a hash mode URL does not work with SSR.
## `prefetchLinks`
- **Type**: `boolean`
- **Default**: `true`
> Configure `<nuxt-link>` to prefetch the code-splitted page when detected within the viewport. Requires [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) to be supported (see [Caniuse](https://caniuse.com/intersectionobserver)).
## `prefetchPayloads`
- **Type**: `boolean`
- **Default**: `true`
> When using `nuxt generate` with target: 'static', Nuxt will generate a payload.js for each page.
With this option enabled, Nuxt will automatically prefetch the payload of the linked page when the `<nuxt-link>` is visible in the viewport, making instant navigation.
## `trailingSlash`
- **Type**: `any`
- **Default**: `{}`
> If this option is set to `true`, trailing slashes will be appended to every route. If set to `false`, they'll be removed.
# `server`
## `https`
- **Type**: `false | { key: string; cert: string }`
- **Default**: `false`
> Whether to enable HTTPS.
## `port`
- **Type**: `number`
- **Default**: `3000`
## `host`
- **Type**: `string`
- **Default**: `"localhost"`
## `socket`
- **Type**: `any`
- **Default**: `{}`
## `timing`
- **Type**: `function`
- **Default**: `undefined`
> Enabling timing adds a middleware to measure the time elapsed during server-side rendering and adds it to the headers as 'Server-Timing'.
```ts
() => any
```
Apart from true/false, this can be an object for providing options. Currently, only `total` is supported (which directly tracks the whole time spent on server-side rendering.
## `url`
- **Type**: `string`
- **Default**: `"http://localhost:3000"`
> Listening dev server url
# `cli`
## `badgeMessages`
- **Type**: `string[]`
- **Default**: `[]`
> Add a message to the CLI banner by adding a string to this array.
## `bannerColor`
- **Type**: `string`
- **Default**: `"green"`
> Change the color of the 'Nuxt.js' title in the CLI banner.
# `generate`
## `dir`
- **Type**: `string`
- **Default**: `"/<rootDir>/dist"`
> Directory name that holds all the assets and generated pages for a `static` build.
## `routes`
- **Type**: `array`
- **Default**: `[]`
> The routes to generate.
If you are using the crawler, this will be only the starting point for route generation. This is often necessary when using dynamic routes.
It can be an array or a function.
## `exclude`
- **Type**: `array`
- **Default**: `[]`
> An array of string or regular expressions that will prevent generation of routes matching them. The routes will still be accessible when `fallback` is set.
## `concurrency`
- **Type**: `number`
- **Default**: `500`
> The number of routes that are generated concurrently in the same thread.
## `interval`
- **Type**: `number`
- **Default**: `0`
> Interval in milliseconds between two render cycles to avoid flooding a potential API with calls.
## `subFolders`
- **Type**: `boolean`
- **Default**: `true`
> Set to `false` to disable creating a directory + `index.html` for each route.
## `fallback`
- **Type**: `string`
- **Default**: `"200.html"`
> The path to the fallback HTML file.
Set this as the error page in your static server configuration, so that unknown routes can be rendered (on the client-side) by Nuxt.
* If unset or set to a falsy value, the name of the fallback HTML file will be `200.html`. * If set to `true`, the filename will be `404.html`. * If you provide a string as a value, it will be used instead.
## `crawler`
- **Type**: `boolean`
- **Default**: `true`
> Set to `false` to disable generating pages discovered through crawling relative links in generated pages.
## `manifest`
- **Type**: `boolean`
- **Default**: `true`
> Set to `false` to disable generating a `manifest.js` with a list of all generated pages.
## `nojekyll`
- **Type**: `boolean`
- **Default**: `true`
> Set to `false` to disable generating a `.nojekyll` file (which aids compatibility with GitHub Pages).
## `cache`
### `ignore`
- **Type**: `array`
- **Default**: `[]`
> An array of files or directories to ignore. (It can also be a function that returns an array.)
### `globbyOptions`
#### `gitignore`
- **Type**: `boolean`
- **Default**: `true`
## `staticAssets`
### `dir`
- **Type**: `string`
- **Default**: `"static"`
> The directory underneath `/_nuxt/`, where static assets (payload, state and manifest files) will live.
### `base`
- **Type**: `string`
- **Default**: `"/_nuxt/<rootDir>/dist"`
> The full path to the directory underneath `/_nuxt/` where static assets (payload, state and manifest files) will live.
### `versionBase`
- **Type**: `string`
- **Default**: `""`
> The full path to the versioned directory where static assets for the current build are located.
### `version`
- **Type**: `string`
- **Default**: `"1666118993"`
> A unique string to uniquely identify payload versions (defaults to the current timestamp).

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc