A simple React template for building Neutralinojs apps with Vite as bundler and Typescript
All prerequisites of Neutralino, Vite, React and Typescript apply. You should have Neutralinojs CLI installed.
Create a new Neutralinojs project with this template with the following command:
neu create myapp --template Cloudwerk/neutralinojs-vite-react-ts
cd myapp
- Create a
.env
file with the contentVITE_GLOBAL_URL=http://localhost:3000/
- Clone this repository
- Adjust the
modes.window.title
andcli.binaryName
to your desired Application Name inside theneutralino.config.json
file - Open a Terminal inside the repos root
- run
neu update
- run
cd vite-src
- Adjust the
name
property to your desired Application Name inside thepackage.json
file - Create a
.env
file with the contentVITE_GLOBAL_URL=http://localhost:3000/
- run
npm install
- When running the dev server with
neu run
, it spams the Terminal withneu: INFO Global variables patch was reverted
Note: There is a workaround for this
Start the React development server and Neutralinojs app:
neu run
Trigger a new React build and create the application bundle with the following command:
neu build