File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 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+ :::
Original file line number Diff line number Diff 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' ,
You can’t perform that action at this time.
0 commit comments