mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
docs(bridge): add notes about feature flags (#1634)
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
This commit is contained in:
parent
52cce01962
commit
8e0c9a489c
@ -120,10 +120,10 @@ If you are using TypeScript, you can edit your `tsconfig.json` to benefit from a
|
|||||||
|
|
||||||
```diff [tsconfig.json]
|
```diff [tsconfig.json]
|
||||||
{
|
{
|
||||||
+ "extends": "./.nuxt/tsconfig.json",
|
+ "extends": "./.nuxt/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ Add the folder `.output` to the `.gitignore` file.
|
|||||||
|
|
||||||
✔️ Try with `nuxt dev` and `nuxt build` (or `nuxt generate`) to see if everything goes well.
|
✔️ Try with `nuxt dev` and `nuxt build` (or `nuxt generate`) to see if everything goes well.
|
||||||
|
|
||||||
🐛 Is something wrong? Please let us know by creating an issue. Also, you can easily disable bridge in the meantime:
|
🐛 Is something wrong? Please let us know by creating an issue. Also, you can easily disable the bridge in the meantime:
|
||||||
|
|
||||||
```ts [nuxt.config.js|ts]
|
```ts [nuxt.config.js|ts]
|
||||||
import { defineNuxtConfig } from '@nuxt/bridge'
|
import { defineNuxtConfig } from '@nuxt/bridge'
|
||||||
@ -193,3 +193,53 @@ export default defineNuxtConfig({
|
|||||||
bridge: false // Temporarily disable bridge integration
|
bridge: false // Temporarily disable bridge integration
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Feature Flags
|
||||||
|
|
||||||
|
You can optionally disable some features from bridge or opt-in to less stable ones. In normal circumstances, it is always best to stick with defaults!
|
||||||
|
|
||||||
|
You can check [bridge/src/module.ts](https://github.com/nuxt/framework/blob/main/packages/bridge/src/module.ts) for latest defaults.
|
||||||
|
|
||||||
|
```ts [nuxt.config.js|ts]
|
||||||
|
import { defineNuxtConfig } from '@nuxt/bridge'
|
||||||
|
|
||||||
|
export default defineNuxtConfig({
|
||||||
|
bridge: {
|
||||||
|
|
||||||
|
// -- Opt-in features --
|
||||||
|
|
||||||
|
// Use Vite as the bundler instead of Webpack 4
|
||||||
|
// vite: true,
|
||||||
|
|
||||||
|
// -- Default features --
|
||||||
|
|
||||||
|
// Use legacy server instead of Nitro
|
||||||
|
// nitro: false,
|
||||||
|
|
||||||
|
// Disable nuxt 3 compatible `nuxtApp` interface
|
||||||
|
// app: false,
|
||||||
|
|
||||||
|
// Disable composition API support
|
||||||
|
// capi: false,
|
||||||
|
|
||||||
|
// Do not transpile modules
|
||||||
|
// transpile: false,
|
||||||
|
|
||||||
|
// Disable <script setup> support
|
||||||
|
// scriptSetup: false,
|
||||||
|
|
||||||
|
// Disable composables auto importing
|
||||||
|
// autoImports: false,
|
||||||
|
|
||||||
|
// Do not warn about module incompatibilities
|
||||||
|
// constraints: false,
|
||||||
|
|
||||||
|
// Disable Nuxt 3 compatible useMeta
|
||||||
|
// meta: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
vite: {
|
||||||
|
// Config for Vite
|
||||||
|
}
|
||||||
|
})
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user