mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
refactor(web): migrate create-react-app to vite (#823)
* fix(build): dockerignore add exclusions * fix: baseurl and build * chore: removed react-app-env instead use vite * chore: updated server and embedding static files. * commented because conflict I believe, and not needed. * docs: updated readme * chore: updated json and added vite * chore: import fix * chore: updated yarn.lock and package json * build: add empty dist to compile backend * fix: use / as default baseurl --------- Co-authored-by: KaiserBh <kaiserbh@proton.me> Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
parent
33897b04a1
commit
1cdbbe5bf3
20 changed files with 717 additions and 9474 deletions
|
@ -19,7 +19,7 @@ import {
|
|||
LogSettings,
|
||||
NotificationSettings,
|
||||
ReleaseSettings
|
||||
} from "../screens/settings/";
|
||||
} from "../screens/settings/index";
|
||||
import { RegexPlayground } from "../screens/settings/RegexPlayground";
|
||||
|
||||
import { baseUrl } from "../utils";
|
||||
|
@ -58,4 +58,4 @@ export const LocalRouter = ({ isLoggedIn }: { isLoggedIn: boolean }) => (
|
|||
</Routes>
|
||||
)}
|
||||
</BrowserRouter>
|
||||
);
|
||||
);
|
1
web/src/react-app-env.d.ts
vendored
1
web/src/react-app-env.d.ts
vendored
|
@ -1 +0,0 @@
|
|||
/// <reference types="react-scripts" />
|
|
@ -9,17 +9,12 @@ export function sleep(ms: number) {
|
|||
export function baseUrl() {
|
||||
let baseUrl = "";
|
||||
if (window.APP.baseUrl) {
|
||||
if (window.APP.baseUrl === "/") {
|
||||
if (window.APP.baseUrl === "{{.BaseUrl}}") {
|
||||
baseUrl = "/";
|
||||
} else if (window.APP.baseUrl === "{{.BaseUrl}}") {
|
||||
baseUrl = "/";
|
||||
} else if (window.APP.baseUrl === "/autobrr/") {
|
||||
baseUrl = "/autobrr/";
|
||||
} else {
|
||||
baseUrl = window.APP.baseUrl;
|
||||
}
|
||||
}
|
||||
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
|
|
1
web/src/vite-env.d.ts
vendored
Normal file
1
web/src/vite-env.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/// <reference types="vite/client" />
|
Loading…
Add table
Add a link
Reference in a new issue