You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration that will be passed directly to Vite.
1606
1606
1607
+
Top-level `vite` options are shared across both client and server environments. Use `$client` and `$server` to provide environment-specific configuration that will be merged into their respective builds.
1608
+
1609
+
**Example**:
1610
+
```ts
1611
+
exportdefaultdefineNuxtConfig({
1612
+
vite: {
1613
+
$client: {
1614
+
build: {
1615
+
rollupOptions: {
1616
+
output: {
1617
+
manualChunks: {
1618
+
analytics: ['analytics-package'],
1619
+
},
1620
+
},
1621
+
},
1622
+
},
1623
+
},
1624
+
$server: {
1625
+
build: {
1626
+
sourcemap: 'inline',
1627
+
},
1628
+
},
1629
+
},
1630
+
})
1631
+
```
1632
+
1607
1633
**See**: [Vite configuration docs](https://vite.dev/config/) for more information.
1608
1634
Please note that not all vite options are supported in Nuxt.
1609
1635
1636
+
### `$client`
1637
+
1638
+
Configuration that will be merged into Vite's configuration for the client (browser) build.
1639
+
1640
+
-**Type**: `object`
1641
+
1642
+
### `$server`
1643
+
1644
+
Configuration that will be merged into Vite's configuration for the server build.
0 commit comments