mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-21 16:09:52 +00:00
docs(schema): grammar, punctuation and typo fixes (#6469)
Co-authored-by: Damian Głowala <48835293+DamianGlowala@users.noreply.github.com>
This commit is contained in:
parent
fb46c83d73
commit
e55938fe6e
@ -21,7 +21,7 @@ export default {
|
|||||||
performance: { $resolve: (val, get) => val ?? get('dev') },
|
performance: { $resolve: (val, get) => val ?? get('dev') },
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Options for the Vue compiler that will be passed at build time
|
* Options for the Vue compiler that will be passed at build time.
|
||||||
* @see [documentation](https://vuejs.org/api/application.html#app-config-compileroptions)
|
* @see [documentation](https://vuejs.org/api/application.html#app-config-compileroptions)
|
||||||
* @type {typeof import('@vue/compiler-core').CompilerOptions}
|
* @type {typeof import('@vue/compiler-core').CompilerOptions}
|
||||||
* @version 3
|
* @version 3
|
||||||
@ -60,12 +60,12 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* An absolute URL to serve the public folder from (production-only).
|
* An absolute URL to serve the public folder from (production-only).
|
||||||
*
|
*
|
||||||
* This can be set to a different value at runtime by setting the NUXT_APP_CDN_URL environment variable.
|
* This can be set to a different value at runtime by setting the `NUXT_APP_CDN_URL` environment variable.
|
||||||
* @example
|
* @example
|
||||||
* ```bash
|
* ```bash
|
||||||
* NUXT_APP_CDN_URL=https://mycdn.org/ node .output/server/index.mjs
|
* NUXT_APP_CDN_URL=https://mycdn.org/ node .output/server/index.mjs
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
cdnURL: {
|
cdnURL: {
|
||||||
$resolve: (val, get) => get('dev') ? '' : (process.env.NUXT_APP_CDN_URL ?? val) || ''
|
$resolve: (val, get) => get('dev') ? '' : (process.env.NUXT_APP_CDN_URL ?? val) || ''
|
||||||
},
|
},
|
||||||
@ -123,11 +123,11 @@ export default {
|
|||||||
|
|
||||||
return resolved
|
return resolved
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* The path to a templated HTML file for rendering Nuxt responses.
|
* The path to an HTML template file for rendering Nuxt responses.
|
||||||
* Uses `<srcDir>/app.html` if it exists or the Nuxt default template if not.
|
* Uses `<srcDir>/app.html` if it exists, or the Nuxt's default template if not.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* ```html
|
* ```html
|
||||||
@ -156,9 +156,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable vuex store.
|
* Enable or disable Vuex store.
|
||||||
*
|
*
|
||||||
* By default it is enabled if there is a `store/` directory
|
* By default, it is enabled if there is a `store/` directory.
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
store: {
|
store: {
|
||||||
@ -263,7 +263,7 @@ export default {
|
|||||||
* @example
|
* @example
|
||||||
* ```js
|
* ```js
|
||||||
* css: [
|
* css: [
|
||||||
* // Load a Node.js module directly (here it's a Sass file)
|
* // Load a Node.js module directly (here it's a Sass file).
|
||||||
* 'bulma',
|
* 'bulma',
|
||||||
* // CSS file in the project
|
* // CSS file in the project
|
||||||
* '@/assets/css/main.css',
|
* '@/assets/css/main.css',
|
||||||
@ -282,7 +282,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* An object where each key name maps to a path to a layout .vue file.
|
* An object where each key name maps to a path to a layout .vue file.
|
||||||
*
|
*
|
||||||
* Normally there is no need to configure this directly.
|
* Normally, there is no need to configure this directly.
|
||||||
* @type {Record<string, string>}
|
* @type {Record<string, string>}
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
@ -291,7 +291,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* Set a custom error page layout.
|
* Set a custom error page layout.
|
||||||
*
|
*
|
||||||
* Normally there is no need to configure this directly.
|
* Normally, there is no need to configure this directly.
|
||||||
* @type {string}
|
* @type {string}
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
@ -304,11 +304,11 @@ export default {
|
|||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
loading: {
|
loading: {
|
||||||
/** CSS color of the progress bar */
|
/** CSS color of the progress bar. */
|
||||||
color: 'black',
|
color: 'black',
|
||||||
/**
|
/**
|
||||||
* CSS color of the progress bar when an error appended while rendering
|
* CSS color of the progress bar when an error appended while rendering
|
||||||
* the route (if data or fetch sent back an error for example).
|
* the route (if data or fetch sent back an error, for example).
|
||||||
*/
|
*/
|
||||||
failedColor: 'red',
|
failedColor: 'red',
|
||||||
/** Height of the progress bar (used in the style property of the progress bar). */
|
/** Height of the progress bar (used in the style property of the progress bar). */
|
||||||
@ -327,7 +327,7 @@ export default {
|
|||||||
continuous: false,
|
continuous: false,
|
||||||
/** Set the direction of the progress bar from right to left. */
|
/** Set the direction of the progress bar from right to left. */
|
||||||
rtl: false,
|
rtl: false,
|
||||||
/** Set to false to remove default progress bar styles (and add your own). */
|
/** Set to `false` to remove default progress bar styles (and add your own). */
|
||||||
css: true
|
css: true
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -337,7 +337,7 @@ export default {
|
|||||||
* Set to `false` to disable. Alternatively, you can pass a string name or an object for more
|
* Set to `false` to disable. Alternatively, you can pass a string name or an object for more
|
||||||
* configuration. The name can refer to an indicator from [SpinKit](https://tobiasahlin.com/spinkit/)
|
* configuration. The name can refer to an indicator from [SpinKit](https://tobiasahlin.com/spinkit/)
|
||||||
* or a path to an HTML template of the indicator source code (in this case, all the
|
* or a path to an HTML template of the indicator source code (in this case, all the
|
||||||
* other options will be passed to the template.)
|
* other options will be passed to the template).
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
loadingIndicator: {
|
loadingIndicator: {
|
||||||
|
@ -8,7 +8,7 @@ import { RuntimeConfig } from '../types/config'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* Extend nested configurations from multiple local or remote sources
|
* Extend nested configurations from multiple local or remote sources.
|
||||||
*
|
*
|
||||||
* Value should be either a string or array of strings pointing to source directories or config path relative to current config.
|
* Value should be either a string or array of strings pointing to source directories or config path relative to current config.
|
||||||
*
|
*
|
||||||
@ -38,7 +38,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* Define the source directory of your Nuxt application.
|
* Define the source directory of your Nuxt application.
|
||||||
*
|
*
|
||||||
* If a relative path is specified it will be relative to the `rootDir`.
|
* If a relative path is specified, it will be relative to the `rootDir`.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* ```js
|
* ```js
|
||||||
@ -91,22 +91,22 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* Whether Nuxt is running in development mode.
|
* Whether Nuxt is running in development mode.
|
||||||
*
|
*
|
||||||
* Normally you should not need to set this.
|
* Normally, you should not need to set this.
|
||||||
* @version 2
|
* @version 2
|
||||||
* @version 3
|
* @version 3
|
||||||
*/
|
*/
|
||||||
dev: Boolean(isDevelopment),
|
dev: Boolean(isDevelopment),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether your app is being unit tested
|
* Whether your app is being unit tested.
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
test: Boolean(isDevelopment),
|
test: Boolean(isDevelopment),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to true to enable debug mode.
|
* Set to `true` to enable debug mode.
|
||||||
*
|
*
|
||||||
* By default it's only enabled in development mode.
|
* By default, it's only enabled in development mode.
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
debug: {
|
debug: {
|
||||||
@ -114,9 +114,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The env property defines environment variables that should be available
|
* The `env` property defines environment variables that should be available
|
||||||
* throughout your app (server- and client-side). They can be assigned using
|
* throughout your app (server- and client-side). They can be assigned using
|
||||||
* server side environment variables.
|
* server-side environment variables.
|
||||||
*
|
*
|
||||||
* @note Nuxt uses webpack's `definePlugin` to define these environment variables.
|
* @note Nuxt uses webpack's `definePlugin` to define these environment variables.
|
||||||
* This means that the actual `process` or `process.env` from Node.js is neither
|
* This means that the actual `process` or `process.env` from Node.js is neither
|
||||||
@ -185,7 +185,7 @@ export default {
|
|||||||
ssr: true,
|
ssr: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use ssr option
|
* @deprecated use `ssr` option
|
||||||
*/
|
*/
|
||||||
mode: {
|
mode: {
|
||||||
$resolve: (val, get) => val || (get('ssr') ? 'spa' : 'universal'),
|
$resolve: (val, get) => val || (get('ssr') ? 'spa' : 'universal'),
|
||||||
@ -216,7 +216,7 @@ export default {
|
|||||||
modern: undefined,
|
modern: undefined,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modules are Nuxt extensions which can extend its core functionality and add endless integrations
|
* 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
|
* 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.
|
* tuple with the module as first string and the options as a second object, or an inline module function.
|
||||||
@ -248,7 +248,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* Modules that are only required during development and build time.
|
* Modules that are only required during development and build time.
|
||||||
*
|
*
|
||||||
* Modules are Nuxt extensions which can extend its core functionality and add endless integrations
|
* 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
|
* 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.
|
* tuple with the module as first string and the options as a second object, or an inline module function.
|
||||||
@ -283,18 +283,18 @@ export default {
|
|||||||
buildModules: [],
|
buildModules: [],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Built-in ad-hoc modules
|
* Built-in ad-hoc modules.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_modules: [],
|
_modules: [],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installed module metadata
|
* Installed module metadata.
|
||||||
*
|
*
|
||||||
* @version 3
|
* @version 3
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_installedModules: [],
|
_installedModules: [],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -333,8 +333,8 @@ export default {
|
|||||||
* for an external server.
|
* 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
|
* 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
|
* can also pass an object with `path` and `handler` keys (`handler` can be a path or a
|
||||||
* function.)
|
* function).
|
||||||
*
|
*
|
||||||
* @note If you pass a function directly, it will only run in development mode.
|
* @note If you pass a function directly, it will only run in development mode.
|
||||||
*
|
*
|
||||||
@ -434,7 +434,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customize default directory structure used by nuxt.
|
* Customize default directory structure used by Nuxt.
|
||||||
*
|
*
|
||||||
* It is better to stick with defaults unless needed.
|
* It is better to stick with defaults unless needed.
|
||||||
* @version 2
|
* @version 2
|
||||||
@ -442,7 +442,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
dir: {
|
dir: {
|
||||||
/**
|
/**
|
||||||
* The assets directory (aliased as `~assets` in your build)
|
* The assets directory (aliased as `~assets` in your build).
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
assets: 'assets',
|
assets: 'assets',
|
||||||
@ -737,7 +737,7 @@ export default {
|
|||||||
* @type {typeof import('../src/types/config').PrivateRuntimeConfig}
|
* @type {typeof import('../src/types/config').PrivateRuntimeConfig}
|
||||||
* @version 2
|
* @version 2
|
||||||
* @version 3
|
* @version 3
|
||||||
* @deprecated Use `runtimeConfig` option
|
* @deprecated Use `runtimeConfig` option.
|
||||||
*/
|
*/
|
||||||
privateRuntimeConfig: {},
|
privateRuntimeConfig: {},
|
||||||
|
|
||||||
@ -745,7 +745,7 @@ export default {
|
|||||||
* @type {typeof import('../src/types/config').PublicRuntimeConfig}
|
* @type {typeof import('../src/types/config').PublicRuntimeConfig}
|
||||||
* @version 2
|
* @version 2
|
||||||
* @version 3
|
* @version 3
|
||||||
* @deprecated Use `runtimeConfig` option with `public` key (`runtimeConfig.public.*`)
|
* @deprecated Use `runtimeConfig` option with `public` key (`runtimeConfig.public.*`).
|
||||||
*/
|
*/
|
||||||
publicRuntimeConfig: {}
|
publicRuntimeConfig: {}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ export default {
|
|||||||
webpack: '@nuxt/webpack-builder',
|
webpack: '@nuxt/webpack-builder',
|
||||||
}
|
}
|
||||||
return map[val] || (get('vite') === false ? map.webpack : map.vite)
|
return map[val] || (get('vite') === false ? map.webpack : map.vite)
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Whether to generate sourcemaps.
|
* Whether to generate sourcemaps.
|
||||||
@ -159,7 +159,7 @@ export default {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable caching for [`terser-webpack-plugin`](https://github.com/webpack-contrib/terser-webpack-plugin#options)
|
* 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)
|
* and [`cache-loader`](https://github.com/webpack-contrib/cache-loader#cache-loader).
|
||||||
*
|
*
|
||||||
* @warning This is an unstable feature.
|
* @warning This is an unstable feature.
|
||||||
* @version 2
|
* @version 2
|
||||||
@ -167,7 +167,7 @@ export default {
|
|||||||
cache: false,
|
cache: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inline server bundle dependencies
|
* Inline server bundle dependencies.
|
||||||
*
|
*
|
||||||
* This mode bundles `node_modules` that are normally preserved as externals in the server build.
|
* This mode bundles `node_modules` that are normally preserved as externals in the server build.
|
||||||
*
|
*
|
||||||
@ -618,7 +618,7 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Set to `false` to disable the overlay provided by [FriendlyErrorsWebpackPlugin](https://github.com/nuxt/friendly-errors-webpack-plugin)
|
* Set to `false` to disable the overlay provided by [FriendlyErrorsWebpackPlugin](https://github.com/nuxt/friendly-errors-webpack-plugin).
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
friendlyErrors: true,
|
friendlyErrors: true,
|
||||||
|
@ -9,34 +9,34 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use vite-node for on-demand server chunk loading
|
* Use `vite-node` for on-demand server chunk loading.
|
||||||
*/
|
*/
|
||||||
viteNode: process.env.EXPERIMENTAL_VITE_NODE ? true : false,
|
viteNode: process.env.EXPERIMENTAL_VITE_NODE ? true : false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Vue's reactivity transform
|
* Enable Vue's reactivity transform.
|
||||||
* @see https://vuejs.org/guide/extras/reactivity-transform.html
|
* @see https://vuejs.org/guide/extras/reactivity-transform.html
|
||||||
*/
|
*/
|
||||||
reactivityTransform: false,
|
reactivityTransform: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Externalize `vue`, `@vue/*` and `vue-router` when build
|
* Externalize `vue`, `@vue/*` and `vue-router` when building.
|
||||||
* @see https://github.com/nuxt/framework/issues/4084
|
* @see https://github.com/nuxt/framework/issues/4084
|
||||||
*/
|
*/
|
||||||
externalVue: false,
|
externalVue: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tree shakes contents of client-only components from server bundle
|
* Tree shakes contents of client-only components from server bundle.
|
||||||
* @see https://github.com/nuxt/framework/pull/5750
|
* @see https://github.com/nuxt/framework/pull/5750
|
||||||
*/
|
*/
|
||||||
treeshakeClientOnly: false,
|
treeshakeClientOnly: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Split server bundle into multiple chunks and dynamically import them
|
* Split server bundle into multiple chunks and dynamically import them.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @see https://github.com/nuxt/framework/issues/6432
|
* @see https://github.com/nuxt/framework/issues/6432
|
||||||
*/
|
*/
|
||||||
viteServerDynamicImports: true,
|
viteServerDynamicImports: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,12 +115,12 @@ export default {
|
|||||||
* routes can be rendered (on the client-side) by Nuxt.
|
* 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 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 set to `true`, the filename will be `404.html`.
|
||||||
* * If you provide a string as a value, it will be used instead.
|
* * If you provide a string as a value, it will be used instead.
|
||||||
*
|
*
|
||||||
* @note Multiple services (e.g. Netlify) detect a `404.html` automatically. If
|
* @note Multiple services (e.g. Netlify) detect a `404.html` automatically. If
|
||||||
* you configure your web server on your own, please consult its documentation
|
* you configure your web server on your own, please consult its documentation
|
||||||
* to find out how to set up an error page (and set it to the 404.html file)
|
* to find out how to set up an error page (and set it to the `404.html` file).
|
||||||
*/
|
*/
|
||||||
fallback: { $resolve: val => val === true ? '400.html' : (val || '200.html') },
|
fallback: { $resolve: val => val === true ? '400.html' : (val || '200.html') },
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* Configuration for Nitro
|
* Configuration for Nitro.
|
||||||
*
|
*
|
||||||
* @see https://nitro.unjs.io/config/
|
* @see https://nitro.unjs.io/config/
|
||||||
*
|
*
|
||||||
* @type {typeof import('nitropack')['NitroConfig']}
|
* @type {typeof import('nitropack')['NitroConfig']}
|
||||||
* @version 2
|
* @version 2
|
||||||
* @version 3
|
* @version 3
|
||||||
*/
|
*/
|
||||||
nitro: {},
|
nitro: {},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nitro server handlers
|
* Nitro server handlers.
|
||||||
*
|
*
|
||||||
* @see https://nitro.unjs.io/guide/routing.html
|
* @see https://nitro.unjs.io/guide/routing.html
|
||||||
*
|
*
|
||||||
@ -23,12 +23,12 @@ export default {
|
|||||||
serverHandlers: [],
|
serverHandlers: [],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nitro devevelopment-only server handlers
|
* Nitro development-only server handlers.
|
||||||
*
|
*
|
||||||
* @see https://nitro.unjs.io/guide/routing.html
|
* @see https://nitro.unjs.io/guide/routing.html
|
||||||
*
|
*
|
||||||
* @type {typeof import('nitropack')['NitroDevEventHandler'][]}
|
* @type {typeof import('nitropack')['NitroDevEventHandler'][]}
|
||||||
* @version 3
|
* @version 3
|
||||||
*/
|
*/
|
||||||
devServerHandlers: []
|
devServerHandlers: []
|
||||||
}
|
}
|
||||||
|
@ -30,24 +30,24 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* Whether to enable rendering of HTML - either dynamically (in server mode) or at generate time.
|
* 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 option is automatically set based on global SSR value if not provided.
|
||||||
* This can be useful to dynamically enable/disable SSR on runtime after image builds
|
* This can be useful to dynamically enable/disable SSR at runtime after image builds
|
||||||
* (with docker for example).
|
* (with docker, for example).
|
||||||
*/
|
*/
|
||||||
ssr: undefined,
|
ssr: undefined,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forward server-side logs to the browser for better debugging (only available in development)
|
* 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.
|
* Set to `collapsed` to collapse the logs, or `false` to disable.
|
||||||
*/
|
*/
|
||||||
ssrLog: { $resolve: (val, get) => get('dev') ? Boolean(val) : false },
|
ssrLog: { $resolve: (val, get) => get('dev') ? Boolean(val) : false },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration for HTTP2 push headers
|
* Configuration for HTTP2 push headers.
|
||||||
*/
|
*/
|
||||||
http2: {
|
http2: {
|
||||||
/** Set to true to enable HTTP2 push headers */
|
/** Set to true to enable HTTP2 push headers. */
|
||||||
push: false,
|
push: false,
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
shouldPush: null,
|
shouldPush: null,
|
||||||
@ -142,7 +142,7 @@ export default {
|
|||||||
* to serve your SSR application.
|
* to serve your SSR application.
|
||||||
*
|
*
|
||||||
* **Updating settings**:
|
* **Updating settings**:
|
||||||
* These settings are read by the Nuxt server directly from `nuxt.config.js`.
|
* 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.
|
* 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.
|
* There is no need to rebuild the application to update CSP settings.
|
||||||
*
|
*
|
||||||
@ -169,7 +169,7 @@ export default {
|
|||||||
* for logging and analytic tracking.
|
* for logging and analytic tracking.
|
||||||
*
|
*
|
||||||
* Review [this blog on Sentry.io](https://blog.sentry.io/2018/09/04/how-sentry-captures-csp-violations)
|
* Review [this blog on Sentry.io](https://blog.sentry.io/2018/09/04/how-sentry-captures-csp-violations)
|
||||||
* To learn what tracking link you should use.
|
* to learn what tracking link you should use.
|
||||||
* @example
|
* @example
|
||||||
* ```js
|
* ```js
|
||||||
* // PRIMARY_HOSTS = `loc.example-website.com`
|
* // PRIMARY_HOSTS = `loc.example-website.com`
|
||||||
@ -226,7 +226,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
addMeta: Boolean(get('target') === 'static'),
|
addMeta: Boolean(get('target') === 'static'),
|
||||||
/**
|
/**
|
||||||
* Set option `unsafeInlineCompatibility` to true if you want both hashes and
|
* Set option `unsafeInlineCompatibility` to `true` if you want both hashes and
|
||||||
* 'unsafe-inline' for CSPv1 compatibility. In that case the `<meta>` tag will
|
* 'unsafe-inline' for CSPv1 compatibility. In that case the `<meta>` tag will
|
||||||
* still only contain the hashes of the inline `<script>` tags, and the policies
|
* still only contain the hashes of the inline `<script>` tags, and the policies
|
||||||
* defined under `csp.policies` will be used in the `Content-Security-Policy`
|
* defined under `csp.policies` will be used in the `Content-Security-Policy`
|
||||||
@ -272,14 +272,14 @@ export default {
|
|||||||
*/
|
*/
|
||||||
fallback: {
|
fallback: {
|
||||||
/**
|
/**
|
||||||
* For routes matching the publicPath (`/_nuxt/*`)
|
* For routes matching the publicPath (`/_nuxt/*`).
|
||||||
* Disable by setting to false.
|
* Disable by setting to `false`.
|
||||||
*/
|
*/
|
||||||
dist: {},
|
dist: {},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For all other routes (`/*`)
|
* For all other routes (`/*`).
|
||||||
* Disable by setting to false.
|
* Disable by setting to `false`.
|
||||||
*/
|
*/
|
||||||
static: {
|
static: {
|
||||||
skipUnknown: true,
|
skipUnknown: true,
|
||||||
|
@ -2,31 +2,30 @@ import { normalizeURL, withTrailingSlash } from 'ufo'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* Additional options passed to vue-router
|
* Additional options passed to `vue-router`.
|
||||||
*
|
*
|
||||||
* Note: Only JSON serializable options should be passed by nuxt config.
|
* Note: Only JSON serializable options should be passed by nuxt config.
|
||||||
*
|
*
|
||||||
* For more control, you can use `app/router.optionts.ts` file.
|
* For more control, you can use `app/router.optionts.ts` file.
|
||||||
*
|
*
|
||||||
* @see [documentation](https://router.vuejs.org/api/interfaces/routeroptions.html)
|
* @see [documentation](https://router.vuejs.org/api/interfaces/routeroptions.html).
|
||||||
* @type {import('../src/types/router').RouterConfigSerializable}
|
* @type {import('../src/types/router').RouterConfigSerializable}
|
||||||
*
|
*
|
||||||
* @version 3
|
* @version 3
|
||||||
*/
|
*/
|
||||||
options: {},
|
options: {},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure the router mode.
|
* Configure the router mode.
|
||||||
*
|
*
|
||||||
* For server-side rendering it is not recommended to change it./**
|
* For server-side rendering it is not recommended to change it.
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
mode: 'history',
|
mode: 'history',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base URL of the app. For example, if the entire single page application is
|
* 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/'.
|
* 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
|
* This can be useful if you need to serve Nuxt as a different context root, from
|
||||||
* within a bigger web site.
|
* within a bigger web site.
|
||||||
@ -75,7 +74,7 @@ export default {
|
|||||||
linkExactActiveClass: 'nuxt-link-exact-active',
|
linkExactActiveClass: 'nuxt-link-exact-active',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Globally configure `<nuxt-link>` default prefetch class (feature disabled by default)
|
* Globally configure `<nuxt-link>` default prefetch class (feature disabled by default).
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
linkPrefetchedClass: false,
|
linkPrefetchedClass: false,
|
||||||
@ -105,9 +104,9 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* The `scrollBehavior` option lets you define a custom behavior for the scroll
|
* 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
|
* position between the routes. This method is called every time a page is
|
||||||
* rendered. To learn more about it.
|
* rendered. To learn more about it, see the `vue-router` documentation.
|
||||||
*
|
*
|
||||||
* @see [vue-router `scrollBehavior` documentation](https://router.vuejs.org/guide/advanced/scroll-behavior.html)
|
* @see [vue-router `scrollBehavior` documentation](https://router.vuejs.org/guide/advanced/scroll-behavior.html).
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
scrollBehavior: {
|
scrollBehavior: {
|
||||||
@ -130,9 +129,9 @@ export default {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Controls whether the router should fall back to hash mode when the browser
|
* Controls whether the router should fall back to hash mode when the browser
|
||||||
* does not support history.pushState but mode is set to history.
|
* does not support history.pushState, but mode is set to history.
|
||||||
*
|
*
|
||||||
* Setting this to false essentially makes every router-link navigation a full
|
* 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
|
* 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.
|
* to work in IE9, because a hash mode URL does not work with SSR.
|
||||||
* @version 2
|
* @version 2
|
||||||
@ -147,7 +146,7 @@ export default {
|
|||||||
prefetchLinks: true,
|
prefetchLinks: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When using nuxt generate with target: 'static', Nuxt will generate a
|
* When using `nuxt generate` with target: 'static', Nuxt will generate a
|
||||||
* payload.js for each page.
|
* payload.js for each page.
|
||||||
*
|
*
|
||||||
* With this option enabled, Nuxt will automatically prefetch the payload of the
|
* With this option enabled, Nuxt will automatically prefetch the payload of the
|
||||||
@ -157,15 +156,15 @@ export default {
|
|||||||
prefetchPayloads: true,
|
prefetchPayloads: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If this option is set to true, trailing slashes will be appended to every
|
* If this option is set to `true`, trailing slashes will be appended to every
|
||||||
* route. If set to false, they'll be removed.
|
* route. If set to `false`, they'll be removed.
|
||||||
*
|
*
|
||||||
* @warning This option should not be set without preparation and has to
|
* @warning This option should not be set without preparation and has to
|
||||||
* be tested thoroughly. When setting `trailingSlash` to something else than
|
* be tested thoroughly. When setting `trailingSlash` to something else than
|
||||||
* undefined, the opposite route will stop working. Thus 301 redirects should
|
* `undefined`, the opposite route will stop working. Thus, 301 redirects should
|
||||||
* be in place and your internal linking has to be adapted correctly. If you set
|
* be in place and your internal linking has to be adapted correctly. If you set
|
||||||
* `trailingSlash` to true, then only example.com/abc/ will work but not
|
* `trailingSlash` to `true`, then only `example.com/abc/` will work, but not
|
||||||
* example.com/abc. On false, it's vice-versa
|
* `example.com/abc`. On `false`, it's vice-versa.
|
||||||
* @version 2
|
* @version 2
|
||||||
*/
|
*/
|
||||||
trailingSlash: undefined
|
trailingSlash: undefined
|
||||||
|
@ -23,7 +23,7 @@ export default {
|
|||||||
typeCheck: false,
|
typeCheck: false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* You can extend generated `.nuxt/tsconfig.json` using this option
|
* You can extend generated `.nuxt/tsconfig.json` using this option.
|
||||||
* @type {typeof import('pkg-types')['readPackageJSON']}
|
* @type {typeof import('pkg-types')['readPackageJSON']}
|
||||||
*/
|
*/
|
||||||
tsConfig: {},
|
tsConfig: {},
|
||||||
|
@ -13,10 +13,10 @@ export default {
|
|||||||
*/
|
*/
|
||||||
vite: {
|
vite: {
|
||||||
root: {
|
root: {
|
||||||
$resolve: (val, get) => val ?? get('srcDir'),
|
$resolve: (val, get) => val ?? get('srcDir')
|
||||||
},
|
},
|
||||||
mode: {
|
mode: {
|
||||||
$resolve: (val, get) => val ?? (get('dev') ? 'development' : 'production'),
|
$resolve: (val, get) => val ?? (get('dev') ? 'development' : 'production')
|
||||||
},
|
},
|
||||||
logLevel: 'warn',
|
logLevel: 'warn',
|
||||||
define: {
|
define: {
|
||||||
@ -26,27 +26,29 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
|
||||||
},
|
},
|
||||||
publicDir: {
|
publicDir: {
|
||||||
$resolve: (val, get) => val ?? resolve(get('srcDir'), get('dir').public),
|
$resolve: (val, get) => val ?? resolve(get('srcDir'), get('dir').public)
|
||||||
},
|
},
|
||||||
vue: {
|
vue: {
|
||||||
isProduction: {
|
isProduction: {
|
||||||
$resolve: (val, get) => val ?? !get('dev'),
|
$resolve: (val, get) => val ?? !get('dev')
|
||||||
},
|
|
||||||
template: { compilerOptions: {
|
|
||||||
$resolve: (val, get) => val ?? get('vue').compilerOptions }
|
|
||||||
},
|
},
|
||||||
|
template: {
|
||||||
|
compilerOptions: {
|
||||||
|
$resolve: (val, get) => val ?? get('vue').compilerOptions
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
exclude: {
|
exclude: {
|
||||||
$resolve: (val, get) => [
|
$resolve: (val, get) => [
|
||||||
...val || [],
|
...val || [],
|
||||||
...get('build.transpile').filter(i => typeof i === 'string'),
|
...get('build.transpile').filter((i) => typeof i === 'string'),
|
||||||
'vue-demi'
|
'vue-demi'
|
||||||
],
|
]
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
esbuild: {
|
esbuild: {
|
||||||
jsxFactory: 'h',
|
jsxFactory: 'h',
|
||||||
@ -56,9 +58,9 @@ export default {
|
|||||||
clearScreen: false,
|
clearScreen: false,
|
||||||
build: {
|
build: {
|
||||||
assetsDir: {
|
assetsDir: {
|
||||||
$resolve: (val, get) => val ?? withoutLeadingSlash(get('app').buildAssetsDir),
|
$resolve: (val, get) => val ?? withoutLeadingSlash(get('app').buildAssetsDir)
|
||||||
},
|
},
|
||||||
emptyOutDir: false,
|
emptyOutDir: false
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
fs: {
|
fs: {
|
||||||
|
@ -35,7 +35,7 @@ export default {
|
|||||||
*
|
*
|
||||||
* It is normally enabled by CLI argument `--profile`.
|
* It is normally enabled by CLI argument `--profile`.
|
||||||
*
|
*
|
||||||
* @see [webpackbar](https://github.com/unjs/webpackbar#profile)
|
* @see [webpackbar](https://github.com/unjs/webpackbar#profile).
|
||||||
*/
|
*/
|
||||||
profile: process.argv.includes('--profile'),
|
profile: process.argv.includes('--profile'),
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ export default {
|
|||||||
extractCSS: true,
|
extractCSS: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables CSS source map support (defaults to true in development)
|
* Enables CSS source map support (defaults to `true` in development).
|
||||||
*/
|
*/
|
||||||
cssSourceMap: {
|
cssSourceMap: {
|
||||||
$resolve: (val, get) => val ?? get('dev')
|
$resolve: (val, get) => val ?? get('dev')
|
||||||
@ -211,7 +211,7 @@ export default {
|
|||||||
*
|
*
|
||||||
* Set to false to disable this plugin, or pass an object of options.
|
* Set to false to disable this plugin, or pass an object of options.
|
||||||
*
|
*
|
||||||
* @see [terser-webpack-plugin documentation](https://github.com/webpack-contrib/terser-webpack-plugin)
|
* @see [terser-webpack-plugin documentation](https://github.com/webpack-contrib/terser-webpack-plugin).
|
||||||
*
|
*
|
||||||
* @note Enabling sourceMap will leave `//# sourceMappingURL` linking comment at
|
* @note Enabling sourceMap will leave `//# sourceMappingURL` linking comment at
|
||||||
* the end of each output file if webpack `config.devtool` is set to `source-map`.
|
* the end of each output file if webpack `config.devtool` is set to `source-map`.
|
||||||
@ -246,7 +246,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
optimization: {
|
optimization: {
|
||||||
runtimeChunk: 'single',
|
runtimeChunk: 'single',
|
||||||
/** Set minimize to false to disable all minimizers. (It is disabled in development by default) */
|
/** Set minimize to `false` to disable all minimizers. (It is disabled in development by default). */
|
||||||
minimize: { $resolve: (val, get) => val ?? !get('dev') },
|
minimize: { $resolve: (val, get) => val ?? !get('dev') },
|
||||||
/** You can set minimizer to a customized array of plugins. */
|
/** You can set minimizer to a customized array of plugins. */
|
||||||
minimizer: undefined,
|
minimizer: undefined,
|
||||||
@ -288,7 +288,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
hotMiddleware: {},
|
hotMiddleware: {},
|
||||||
/**
|
/**
|
||||||
* Set to `false` to disable the overlay provided by [FriendlyErrorsWebpackPlugin](https://github.com/nuxt/friendly-errors-webpack-plugin)
|
* Set to `false` to disable the overlay provided by [FriendlyErrorsWebpackPlugin](https://github.com/nuxt/friendly-errors-webpack-plugin).
|
||||||
*/
|
*/
|
||||||
friendlyErrors: true,
|
friendlyErrors: true,
|
||||||
/**
|
/**
|
||||||
|
@ -10,8 +10,8 @@ export interface NuxtCompatibility {
|
|||||||
/**
|
/**
|
||||||
* Bridge constraint for Nuxt 2 support.
|
* Bridge constraint for Nuxt 2 support.
|
||||||
*
|
*
|
||||||
* - `true`: When using Nuxt 2, using bridge module is required
|
* - `true`: When using Nuxt 2, using bridge module is required.
|
||||||
* - `false`: When using Nuxt 2, using bridge module is not supported
|
* - `false`: When using Nuxt 2, using bridge module is not supported.
|
||||||
*/
|
*/
|
||||||
bridge?: boolean
|
bridge?: boolean
|
||||||
}
|
}
|
||||||
@ -23,7 +23,7 @@ export interface NuxtCompatibilityIssue {
|
|||||||
|
|
||||||
export interface NuxtCompatibilityIssues extends Array<NuxtCompatibilityIssue> {
|
export interface NuxtCompatibilityIssues extends Array<NuxtCompatibilityIssue> {
|
||||||
/**
|
/**
|
||||||
* Return formatted error message
|
* Return formatted error message.
|
||||||
*/
|
*/
|
||||||
toString(): string
|
toString(): string
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ export interface Component {
|
|||||||
export interface ScanDir {
|
export interface ScanDir {
|
||||||
/**
|
/**
|
||||||
* Path (absolute or relative) to the directory containing your components.
|
* Path (absolute or relative) to the directory containing your components.
|
||||||
* You can use Nuxt aliases (~ or @) to refer to directories inside project or directly use a npm package path similar to require.
|
* You can use Nuxt aliases (~ or @) to refer to directories inside project or directly use an npm package path similar to require.
|
||||||
*/
|
*/
|
||||||
path: string
|
path: string
|
||||||
/**
|
/**
|
||||||
@ -39,7 +39,7 @@ export interface ScanDir {
|
|||||||
*/
|
*/
|
||||||
prefix?: string
|
prefix?: string
|
||||||
/**
|
/**
|
||||||
* Prefix component name by it's path.
|
* Prefix component name by its path.
|
||||||
*/
|
*/
|
||||||
pathPrefix?: boolean
|
pathPrefix?: boolean
|
||||||
/**
|
/**
|
||||||
@ -62,7 +62,7 @@ export interface ScanDir {
|
|||||||
*/
|
*/
|
||||||
preload?: boolean
|
preload?: boolean
|
||||||
/**
|
/**
|
||||||
* This flag indicates, component should be loaded async (with a seperate chunk) regardless of using Lazy prefix or not.
|
* This flag indicates, component should be loaded async (with a separate chunk) regardless of using Lazy prefix or not.
|
||||||
*/
|
*/
|
||||||
isAsync?: boolean
|
isAsync?: boolean
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { UnimportOptions } from 'unimport'
|
|||||||
|
|
||||||
export interface AutoImportsOptions extends UnimportOptions {
|
export interface AutoImportsOptions extends UnimportOptions {
|
||||||
dirs?: string[]
|
dirs?: string[]
|
||||||
global?: boolean,
|
global?: boolean
|
||||||
transform?: {
|
transform?: {
|
||||||
exclude?: RegExp[]
|
exclude?: RegExp[]
|
||||||
include?: RegExp[]
|
include?: RegExp[]
|
||||||
|
@ -3,10 +3,10 @@ import type { Nuxt, NuxtTemplate } from "./nuxt"
|
|||||||
import type { NuxtCompatibility } from './compatibility'
|
import type { NuxtCompatibility } from './compatibility'
|
||||||
|
|
||||||
export interface ModuleMeta {
|
export interface ModuleMeta {
|
||||||
/** Module name */
|
/** Module name. */
|
||||||
name?: string
|
name?: string
|
||||||
|
|
||||||
/** Module version */
|
/** Module version. */
|
||||||
version?: string
|
version?: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,17 +16,17 @@ export interface ModuleMeta {
|
|||||||
configKey?: string
|
configKey?: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constraints for the versions of Nuxt or features this module requires
|
* Constraints for the versions of Nuxt or features this module requires.
|
||||||
*/
|
*/
|
||||||
compatibility?: NuxtCompatibility
|
compatibility?: NuxtCompatibility
|
||||||
|
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The options received */
|
/** The options received. */
|
||||||
export type ModuleOptions = Record<string, any>
|
export type ModuleOptions = Record<string, any>
|
||||||
|
|
||||||
/** Input module passed to defineNuxtModule */
|
/** Input module passed to defineNuxtModule. */
|
||||||
export interface ModuleDefinition<T extends ModuleOptions = ModuleOptions> {
|
export interface ModuleDefinition<T extends ModuleOptions = ModuleOptions> {
|
||||||
meta?: ModuleMeta
|
meta?: ModuleMeta
|
||||||
defaults?: T | ((nuxt: Nuxt) => T)
|
defaults?: T | ((nuxt: Nuxt) => T)
|
||||||
@ -35,7 +35,7 @@ export interface ModuleDefinition<T extends ModuleOptions = ModuleOptions> {
|
|||||||
setup?: (this: void, resolvedOptions: T, nuxt: Nuxt) => void | Promise<void>
|
setup?: (this: void, resolvedOptions: T, nuxt: Nuxt) => void | Promise<void>
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Nuxt modules are always a simple function */
|
/** Nuxt modules are always a simple function. */
|
||||||
export interface NuxtModule<T extends ModuleOptions = ModuleOptions> {
|
export interface NuxtModule<T extends ModuleOptions = ModuleOptions> {
|
||||||
(this: void, inlineOptions: T, nuxt: Nuxt): void | Promise<void>
|
(this: void, inlineOptions: T, nuxt: Nuxt): void | Promise<void>
|
||||||
getOptions?: (inlineOptions?: T, nuxt?: Nuxt) => Promise<T>
|
getOptions?: (inlineOptions?: T, nuxt?: Nuxt) => Promise<T>
|
||||||
@ -58,10 +58,10 @@ export interface ModuleContainer {
|
|||||||
/** Renders given template using lodash template during build into the project buildDir (`.nuxt`).*/
|
/** Renders given template using lodash template during build into the project buildDir (`.nuxt`).*/
|
||||||
addTemplate(template: string | NuxtTemplate): NuxtTemplate
|
addTemplate(template: string | NuxtTemplate): NuxtTemplate
|
||||||
|
|
||||||
/** Register a custom layout. If its name is 'error' it will override the default error layout. */
|
/** Registers a custom layout. If its name is 'error' it will override the default error layout. */
|
||||||
addLayout(tmpl: NuxtTemplate, name: string): any
|
addLayout(tmpl: NuxtTemplate, name: string): any
|
||||||
|
|
||||||
/** Set the layout that will render Nuxt errors. It should already have been added via addLayout or addTemplate. */
|
/** Sets the layout that will render Nuxt errors. It should already have been added via addLayout or addTemplate. */
|
||||||
addErrorLayout(dst: string): void
|
addErrorLayout(dst: string): void
|
||||||
|
|
||||||
/** Adds a new server middleware to the end of the server middleware array. */
|
/** Adds a new server middleware to the end of the server middleware array. */
|
||||||
@ -73,9 +73,9 @@ export interface ModuleContainer {
|
|||||||
/** Allows extending routes by chaining `options.router.extendRoutes` function. */
|
/** Allows extending routes by chaining `options.router.extendRoutes` function. */
|
||||||
extendRoutes(fn): void
|
extendRoutes(fn): void
|
||||||
|
|
||||||
/** Registers a module */
|
/** Registers a module. */
|
||||||
requireModule(installOptions: any, opts: any): Promise<void>
|
requireModule(installOptions: any, opts: any): Promise<void>
|
||||||
|
|
||||||
/** Registers a module */
|
/** Registers a module. */
|
||||||
addModule(installOptions: any, opts: any): Promise<void>
|
addModule(installOptions: any, opts: any): Promise<void>
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import type { NuxtHooks, NuxtLayout, NuxtMiddleware } from './hooks'
|
|||||||
import type { NuxtOptions } from './config'
|
import type { NuxtOptions } from './config'
|
||||||
|
|
||||||
export interface Nuxt {
|
export interface Nuxt {
|
||||||
// Private fields
|
// Private fields.
|
||||||
_version: string
|
_version: string
|
||||||
_ignore?: Ignore
|
_ignore?: Ignore
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ export interface Nuxt {
|
|||||||
ready: () => Promise<void>
|
ready: () => Promise<void>
|
||||||
close: () => Promise<void>
|
close: () => Promise<void>
|
||||||
|
|
||||||
/** The production or development server */
|
/** The production or development server. */
|
||||||
server?: any
|
server?: any
|
||||||
|
|
||||||
vfs: Record<string, string>
|
vfs: Record<string, string>
|
||||||
@ -37,7 +37,7 @@ export interface NuxtTemplate {
|
|||||||
options?: Record<string, any>
|
options?: Record<string, any>
|
||||||
/** The resolved path to the source file to be template */
|
/** The resolved path to the source file to be template */
|
||||||
src?: string
|
src?: string
|
||||||
/** Provided compile option intead of src */
|
/** Provided compile option instead of src */
|
||||||
getContents?: (data: Record<string, any>) => string | Promise<string>
|
getContents?: (data: Record<string, any>) => string | Promise<string>
|
||||||
/** Write to filesystem */
|
/** Write to filesystem */
|
||||||
write?: boolean
|
write?: boolean
|
||||||
|
Loading…
Reference in New Issue
Block a user