@nuxt/docs-nightly 5.0.0-29650558.0fa4813e → 5.0.0-29651606.df97902f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/4.api/6.nuxt-config.md +38 -0
- package/package.json +1 -1
package/4.api/6.nuxt-config.md
CHANGED
|
@@ -1604,9 +1604,47 @@ export default defineNuxtConfig({
|
|
|
1604
1604
|
|
|
1605
1605
|
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
|
+
export default defineNuxtConfig({
|
|
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.
|
|
1645
|
+
|
|
1646
|
+
- **Type**: `object`
|
|
1647
|
+
|
|
1610
1648
|
### `build`
|
|
1611
1649
|
|
|
1612
1650
|
#### `assetsDir`
|