Migrate from create react app to vite

This commit is contained in:
Przemek Więch
2025-02-05 17:05:34 +01:00
parent 99a217191b
commit b3f5ae1c25
22 changed files with 3751 additions and 21797 deletions

View File

@@ -96,7 +96,7 @@ cd topola-viewer
npm install
npm run build
```
Now, take the contents of the `build/` folder and host it on your own server.
Now, take the contents of the `dist/` folder and host it on your own server.
### Use an existing package
@@ -107,18 +107,18 @@ These are the exact files that are hosted on GitHub pages.
### Build for your own data only
You can run Topola Viewer in a "single tree mode" that displays only the GEDCOM you specify. Specify the URL to a GEDCOM file in the `REACT_APP_STATIC_URL` environment variable when building and running the application.
You can run Topola Viewer in a "single tree mode" that displays only the GEDCOM you specify. Specify the URL to a GEDCOM file in the `VITE_STATIC_URL` environment variable when building and running the application.
Run locally with the specified data URL:
```
REACT_APP_STATIC_URL=https://example.org/sample.ged npm start
VITE_STATIC_URL=https://example.org/sample.ged npm start
```
Build with the specified data URL:
```
REACT_APP_STATIC_URL=https://example.org/sample.ged npm run build
VITE_STATIC_URL=https://example.org/sample.ged npm run build
```
The `build/` folder will contain files that can be hosted on a Web server.
The `dist/` folder will contain files that can be hosted on a Web server.
### Alternative build