Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bartosz-dude/neutralino-solid-vite

neutralino template with solid + vite with configured frontend api
https://github.com/bartosz-dude/neutralino-solid-vite

Last synced: about 2 months ago
JSON representation

neutralino template with solid + vite with configured frontend api

Awesome Lists containing this project

README

        

# neutralino-solid-vite

[Neutralino](https://neutralino.js.org/) app template with [solid](https://solidjs.com), vite and typescript for the frontend.

## Features

- configured neutralino frontend api
- frontend HMR support
- `dev` and `build` npm scripts

## Installation

Clone this repo

```bash
git clone https://github.com/bartosz-dude/neutralino-solid-vite.git
```

Next you run this npm script in the root folder of your project

```bash
npm install
```

This will install all dependencies and neutralino binaries

## Known problems

- When closing app window in dev mode, vite doesn't stop
- may not work on first start (white screen); restart should make it work

## Why the env

Neutralino requires `__neutralino_globals.js` in `index.html` on frontend to properly connect the frontend server to neutralino server.

Docs say to use patching from neutralino config on `index.html` when using dynamic neutralino port. This only works in dev.

Static neutralino port fixes this, but throws an error when trying to open second release instance.

Using `%PUBLIC_URL%` makes vite throw an `URI malformed` error in dev when using dynamic port, but works in release.

Using the vite env makes so that patching is used in dev and `%PUBLIC_URL%` in release.