Skip to content

A template to kickstart your Neutralino.js apps with React, Vite, and optionally TypeScript!

License

Notifications You must be signed in to change notification settings

benjammin4dayz/neu-react-vite

Repository files navigation

neu-iconneu-react-vitereact-iconreact-icon

A minimal template for building Neutralino.js apps using React and Vite.

About

This Neutralino app template features HMR (Hot Module Replacement) and uses SWC (Speedy Web Compiler). It can be converted to TypeScript with a single command!

Demo

Start developing your app in less than 30 seconds!

demo.mp4

Getting Started

This template abstracts the setup process by using the neu CLI under the hood.

Prerequisites

  • Node.js
  • npm

Installation

  1. Create a new app with neu create

    npx @neutralinojs/neu create myapp --template benjammin4dayz/neu-react-vite
    cd myapp
Alternative Method (Expand)
  1. Clone the repo

    git clone --depth=1 https://github.com/benjammin4dayz/neu-react-vite.git
    cd neu-react-vite
  2. Install dependencies

    npm run setup

Configuration

  • Convert this template to TypeScript

    node .ts-convert

Usage

  • Local Development

    # Develop
    npm start
    # Build
    npm run build
    # Package
    npm run build:release

    View scripts

  • GitHub Actions

    # Build and draft a release on GitHub:
    git tag <tag_name>
    git push origin <tag_name>

    View workflow

Troubleshooting

Before proceeding, try refreshing the page inside your app with F5, CTRL + R, or by right-clicking and selecting Refresh.

Blank screen with no errors during development

Try pasting this snippet in the DevTools console tab:

window.location.href = 'http://localhost:3000';