2023-10-18 10:59:43 +00:00
|
|
|
---
|
|
|
|
title: Vite
|
|
|
|
description: 'Activate Vite to your Nuxt 2 application with Nuxt Bridge.'
|
|
|
|
---
|
2023-08-29 09:55:59 +00:00
|
|
|
|
2024-02-21 17:09:45 +00:00
|
|
|
::warning
|
2023-08-29 09:55:59 +00:00
|
|
|
When using `vite`, [nitro](/docs/bridge/nitro) must have been configured.
|
|
|
|
::
|
|
|
|
|
|
|
|
## Remove Modules
|
|
|
|
|
|
|
|
- Remove `nuxt-vite`: Bridge enables same functionality
|
|
|
|
|
|
|
|
## Update Config
|
|
|
|
|
2023-10-18 10:59:43 +00:00
|
|
|
```ts [nuxt.config.ts]
|
2023-08-29 09:55:59 +00:00
|
|
|
import { defineNuxtConfig } from '@nuxt/bridge'
|
|
|
|
|
|
|
|
export default defineNuxtConfig({
|
|
|
|
bridge: {
|
|
|
|
vite: true,
|
|
|
|
nitro: true
|
|
|
|
}
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2023-10-18 10:59:43 +00:00
|
|
|
```ts [nuxt.config.ts]
|
2023-08-29 09:55:59 +00:00
|
|
|
import { defineNuxtConfig } from '@nuxt/bridge'
|
|
|
|
|
|
|
|
export default defineNuxtConfig({
|
|
|
|
vite: {
|
|
|
|
// Config for Vite
|
|
|
|
}
|
|
|
|
})
|
|
|
|
```
|