Skip to content

Commit b44c2af

Browse files
committed
feat: show vite.config mention in sidebar project structure for awareness
1 parent 4c175f8 commit b44c2af

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: vite.config.ts
3+
description: NativeScript apps can be bundled with Vite, giving you flexibility to configure it any way you need it.
4+
contributors:
5+
- NathanWalker
6+
---
7+
8+
At anytime you can switch to Vite build tooling if you prefer. The bundling process can be further customized via the `vite.config.ts`.
9+
10+
### Default vite config
11+
12+
By default, the vite config will automatically configure everything for your project, and should looks something like this:
13+
14+
```js
15+
import { defineConfig, mergeConfig, UserConfig } from 'vite'
16+
import { typescriptConfig } from '@nativescript/vite'
17+
18+
export default defineConfig(({ mode }): UserConfig => {
19+
return mergeConfig(typescriptConfig({ mode }), {})
20+
})
21+
```
22+
23+
::: tip Read More
24+
25+
:point_right: [NativeScript Vite Reference](/configuration/vite)
26+
27+
:::

content/sidebar.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ export default [
123123
link: '/project-structure/tsconfig-json',
124124
icon: 'file',
125125
},
126+
{
127+
text: 'vite.config.ts',
128+
link: '/project-structure/vite-config',
129+
icon: 'file',
130+
},
126131
{
127132
text: 'webpack.config.js',
128133
link: '/project-structure/webpack-config',

0 commit comments

Comments
 (0)