File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,24 @@ npm install @nativescript/vite
1717
1818## Quick start (` init ` )
1919
20- To bootstrap an existing NativeScript app for Vite, run from your app root:
20+ To bootstrap an existing NativeScript app with Vite, you can first adjust your config.
21+
22+ ### 1. Adjust nativescript.config.ts to use Vite
23+
24+ Make sure your ` nativescript.config.ts ` includes the following to use Vite as the bundler:
25+
26+ ``` ts
27+ export default {
28+ // ...
29+ bundler: " vite" ,
30+ bundlerConfigPath: " vite.config.ts" ,
31+ // ...
32+ };
33+ ```
34+
35+ ### 2. Init the config
36+
37+ Now run from your app root:
2138
2239``` bash
2340npx nativescript-vite init
@@ -274,3 +291,18 @@ Be sure to have a proper security policy in place using something as follows:
274291 ...
275292< / application>
276293` ` `
294+
295+ ## Troubleshooting
296+
297+ If you run into issues or have questions, please visit the [NativeScript Community Discord](https://nativescript.org/discord).
298+
299+ If you see your app is not building with Vite, ensure that your ` nativescript .config .ts ` has the correct bundler set:
300+
301+ ` ` ` ts
302+ export default {
303+ // ...
304+ bundler: " vite" ,
305+ bundlerConfigPath: " vite.config.ts" ,
306+ // ...
307+ };
308+ ` ` `
You can’t perform that action at this time.
0 commit comments