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,7 +22,11 @@ export default {
|
||||
return map[val] || (get('vite') === false ? map.webpack : map.vite)
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Shared build configuration.
|
||||
* @version 2
|
||||
* @version 3
|
||||
*/
|
||||
build: {
|
||||
/**
|
||||
* Suppresses most of the build output log.
|
||||
|
@ -1,7 +1,8 @@
|
||||
export default {
|
||||
/** @version 3 */
|
||||
experimental: {
|
||||
/**
|
||||
* 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
|
||||
@ -9,14 +10,13 @@ export default {
|
||||
|
||||
/**
|
||||
* Use vite-node for on-demand server chunk loading
|
||||
* @version 3
|
||||
*/
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -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