mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +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'
|
import defu from 'defu'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
/** Vue.js config */
|
/**
|
||||||
|
* Vue.js config
|
||||||
|
* @version 2
|
||||||
|
* @version 3
|
||||||
|
*/
|
||||||
vue: {
|
vue: {
|
||||||
/**
|
/**
|
||||||
* Properties that will be set directly on `Vue.config` for vue@2.
|
* 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.
|
* 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> }}
|
* @type {'vite' | 'webpack' | { bundle: (nuxt: typeof import('../src/types/nuxt').Nuxt) => Promise<void> }}
|
||||||
|
* @version 3
|
||||||
*/
|
*/
|
||||||
builder: {
|
builder: {
|
||||||
$resolve: (val, get) => {
|
$resolve: (val, get) => {
|
||||||
@ -21,7 +22,11 @@ export default {
|
|||||||
return map[val] || (get('vite') === false ? map.webpack : map.vite)
|
return map[val] || (get('vite') === false ? map.webpack : map.vite)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Shared build configuration.
|
||||||
|
* @version 2
|
||||||
|
* @version 3
|
||||||
|
*/
|
||||||
build: {
|
build: {
|
||||||
/**
|
/**
|
||||||
* Suppresses most of the build output log.
|
* Suppresses most of the build output log.
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
export default {
|
export default {
|
||||||
|
/** @version 3 */
|
||||||
|
experimental: {
|
||||||
/**
|
/**
|
||||||
* Set to true to generate an async entrypoint for the Vue bundle (for module federation support).
|
* Set to true to generate an async entrypoint for the Vue bundle (for module federation support).
|
||||||
* @version 3
|
|
||||||
*/
|
*/
|
||||||
asyncEntry: {
|
asyncEntry: {
|
||||||
$resolve: (val, get) => val ?? (get('dev') && get('experimental.viteNode')) ?? false
|
$resolve: (val, get) => val ?? (get('dev') && get('experimental.viteNode')) ?? false
|
||||||
@ -9,14 +10,13 @@ export default {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Use vite-node for on-demand server chunk loading
|
* Use vite-node for on-demand server chunk loading
|
||||||
* @version 3
|
|
||||||
*/
|
*/
|
||||||
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
|
||||||
* @version 3
|
|
||||||
*/
|
*/
|
||||||
reactivityTransform: false
|
reactivityTransform: false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -45,6 +45,7 @@ export default {
|
|||||||
...vite,
|
...vite,
|
||||||
...webpack,
|
...webpack,
|
||||||
...nitro,
|
...nitro,
|
||||||
|
...experimental,
|
||||||
// Legacy
|
// Legacy
|
||||||
...build,
|
...build,
|
||||||
messages,
|
messages,
|
||||||
@ -53,5 +54,4 @@ export default {
|
|||||||
server,
|
server,
|
||||||
cli,
|
cli,
|
||||||
generate,
|
generate,
|
||||||
experimental,
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
/**
|
|
||||||
* @version 3
|
|
||||||
*/
|
|
||||||
export default {
|
export default {
|
||||||
experimentNitropack: process.env.EXPERIMENT_NITROPACK ? true : false,
|
experimentNitropack: process.env.EXPERIMENT_NITROPACK ? true : false,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Configuration for Nuxt Nitro.
|
||||||
|
*
|
||||||
* @typedef {Awaited<ReturnType<typeof import('nitropack')['NitroConfig']>>}
|
* @typedef {Awaited<ReturnType<typeof import('nitropack')['NitroConfig']>>}
|
||||||
|
* @version 2
|
||||||
|
* @version 3
|
||||||
*/
|
*/
|
||||||
nitro: {}
|
nitro: {}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
export default {
|
export default {
|
||||||
|
/**
|
||||||
|
* Configuration for Nuxt's TypeScript integration.
|
||||||
|
*
|
||||||
|
* @version 2
|
||||||
|
* @version 3
|
||||||
|
*/
|
||||||
typescript: {
|
typescript: {
|
||||||
/**
|
/**
|
||||||
* TypeScript comes with certain checks to give you more safety and analysis of your program.
|
* TypeScript comes with certain checks to give you more safety and analysis of your program.
|
||||||
|
Loading…
Reference in New Issue
Block a user