
Security News
Socket Releases Free Certified Patches for Nuxt Security Vulnerabilities
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.
@nativescript/vite
Advanced tools
Vite integration for NativeScript apps.
Documentation · Environment Setup · Contribute · Community
npm i @nativescript/vite -D
init)To bootstrap an existing NativeScript app for Vite, run from your app root:
npx nativescript-vite init
This will:
vite.config.ts using the detected project flavor (Angular, Vue, React, Solid, TypeScript, or JavaScript) and the corresponding helper subpath from @nativescript/vite.package.json:
dev:iosdev:androiddev:server:iosdev:server:androidiosandroidconcurrently and wait-on.@valor/nativescript-websockets..ns-vite-build to .gitignore if it is not already present.After running init, you now have two ways to work with Vite:
npm run dev:ios
ns debug ios --no-hmr
ns debug android --no-hmr
vite.config.ts:import { defineConfig, mergeConfig, UserConfig } from 'vite';
import { typescriptConfig } from '@nativescript/vite/typescript';
export default defineConfig(({ mode }): UserConfig => {
return mergeConfig(typescriptConfig({ mode }), {});
});
Framework-specific configs should be imported from their matching subpaths to avoid loading unrelated framework tooling:
import { angularConfig } from '@nativescript/vite/angular';
import { reactConfig } from '@nativescript/vite/react';
import { solidConfig } from '@nativescript/vite/solid';
import { vueConfig } from '@nativescript/vite/vue';
nativescript.config.ts:import { NativeScriptConfig } from '@nativescript/core';
export default {
// add these:
bundler: 'vite',
bundlerConfigPath: 'vite.config.ts',
} as NativeScriptConfig;
Check out the NativeScript Vite documentation for more configuration options and features.
FAQs
Vite for NativeScript
The npm package @nativescript/vite receives a total of 744 weekly downloads. As such, @nativescript/vite popularity was classified as not popular.
We found that @nativescript/vite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.

Security News
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.