mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
docs: add missing configuration documentation to nuxt 3 docs (#4020)
This commit is contained in:
parent
91576c9892
commit
1890c55cbe
@ -3,7 +3,11 @@ import { existsSync, readdirSync } from 'fs'
|
||||
import defu from 'defu'
|
||||
|
||||
export default {
|
||||
/** Vue.js config */
|
||||
/**
|
||||
* Vue.js config
|
||||
* @version 2
|
||||
* @version 3
|
||||
*/
|
||||
vue: {
|
||||
/**
|
||||
* Properties that will be set directly on `Vue.config` for vue@2.
|
||||
|
@ -8,6 +8,7 @@ export default {
|
||||
* The builder to use for bundling the Vue part of your application.
|
||||
*
|
||||
* @type {'vite' | 'webpack' | { bundle: (nuxt: typeof import('../src/types/nuxt').Nuxt) => Promise<void> }}
|
||||
* @version 3
|
||||
*/
|
||||
builder: {
|
||||
$resolve: (val, get) => {
|
||||
@ -21,17 +22,21 @@ export default {
|
||||
return map[val] || (get('vite') === false ? map.webpack : map.vite)
|
||||
},
|
||||
},
|
||||
|
||||
build: {
|
||||
/**
|
||||
* Suppresses most of the build output log.
|
||||
*
|
||||
* It is enabled by default when a CI or test environment is detected.
|
||||
*
|
||||
* @see [std-env](https://github.com/unjs/std-env)
|
||||
/**
|
||||
* Shared build configuration.
|
||||
* @version 2
|
||||
* @version 3
|
||||
*/
|
||||
build: {
|
||||
/**
|
||||
* Suppresses most of the build output log.
|
||||
*
|
||||
* It is enabled by default when a CI or test environment is detected.
|
||||
*
|
||||
* @see [std-env](https://github.com/unjs/std-env)
|
||||
* @version 2
|
||||
* @version 3
|
||||
*/
|
||||
quiet: Boolean(isCI || isTest),
|
||||
|
||||
/**
|
||||
|
@ -1,22 +1,22 @@
|
||||
export default {
|
||||
/**
|
||||
* Set to true to generate an async entrypoint for the Vue bundle (for module federation support).
|
||||
* @version 3
|
||||
*/
|
||||
asyncEntry: {
|
||||
$resolve: (val, get) => val ?? (get('dev') && get('experimental.viteNode')) ?? false
|
||||
},
|
||||
/** @version 3 */
|
||||
experimental: {
|
||||
/**
|
||||
* Set to true to generate an async entrypoint for the Vue bundle (for module federation support).
|
||||
*/
|
||||
asyncEntry: {
|
||||
$resolve: (val, get) => val ?? (get('dev') && get('experimental.viteNode')) ?? false
|
||||
},
|
||||
|
||||
/**
|
||||
* Use vite-node for on-demand server chunk loading
|
||||
* @version 3
|
||||
*/
|
||||
viteNode: process.env.EXPERIMENTAL_VITE_NODE ? true : false,
|
||||
/**
|
||||
* Use vite-node for on-demand server chunk loading
|
||||
*/
|
||||
viteNode: process.env.EXPERIMENTAL_VITE_NODE ? true : false,
|
||||
|
||||
/**
|
||||
* Enable Vue's reactivity transform
|
||||
* @see https://vuejs.org/guide/extras/reactivity-transform.html
|
||||
* @version 3
|
||||
*/
|
||||
reactivityTransform: false
|
||||
/**
|
||||
* Enable Vue's reactivity transform
|
||||
* @see https://vuejs.org/guide/extras/reactivity-transform.html
|
||||
*/
|
||||
reactivityTransform: false
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ export default {
|
||||
...vite,
|
||||
...webpack,
|
||||
...nitro,
|
||||
...experimental,
|
||||
// Legacy
|
||||
...build,
|
||||
messages,
|
||||
@ -53,5 +54,4 @@ export default {
|
||||
server,
|
||||
cli,
|
||||
generate,
|
||||
experimental,
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
/**
|
||||
* @version 3
|
||||
*/
|
||||
export default {
|
||||
experimentNitropack: process.env.EXPERIMENT_NITROPACK ? true : false,
|
||||
|
||||
/**
|
||||
* Configuration for Nuxt Nitro.
|
||||
*
|
||||
* @typedef {Awaited<ReturnType<typeof import('nitropack')['NitroConfig']>>}
|
||||
* @version 2
|
||||
* @version 3
|
||||
*/
|
||||
nitro: {}
|
||||
}
|
||||
|
@ -1,4 +1,10 @@
|
||||
export default {
|
||||
/**
|
||||
* Configuration for Nuxt's TypeScript integration.
|
||||
*
|
||||
* @version 2
|
||||
* @version 3
|
||||
*/
|
||||
typescript: {
|
||||
/**
|
||||
* TypeScript comes with certain checks to give you more safety and analysis of your program.
|
||||
|
Loading…
Reference in New Issue
Block a user