mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
f26a801775
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
38 lines
650 B
Markdown
38 lines
650 B
Markdown
---
|
|
title: Vite
|
|
description: 'Activate Vite to your Nuxt 2 application with Nuxt Bridge.'
|
|
---
|
|
|
|
::callout{color="amber" icon="i-ph-warning-duotone"}
|
|
When using `vite`, [nitro](/docs/bridge/nitro) must have been configured.
|
|
::
|
|
|
|
## Remove Modules
|
|
|
|
- Remove `nuxt-vite`: Bridge enables same functionality
|
|
|
|
## Update Config
|
|
|
|
```ts [nuxt.config.ts]
|
|
import { defineNuxtConfig } from '@nuxt/bridge'
|
|
|
|
export default defineNuxtConfig({
|
|
bridge: {
|
|
vite: true,
|
|
nitro: true
|
|
}
|
|
})
|
|
```
|
|
|
|
## Configuration
|
|
|
|
```ts [nuxt.config.ts]
|
|
import { defineNuxtConfig } from '@nuxt/bridge'
|
|
|
|
export default defineNuxtConfig({
|
|
vite: {
|
|
// Config for Vite
|
|
}
|
|
})
|
|
```
|