* Add dynamic subpath support for WebUI - Add SubpathConfig utility for server-side subpath detection - Configure React Router basename from server config - Update API base URL handling for subpath compatibility - Fix asset loading with relative paths - Add VITE_SUBPATH environment variable for development - Update locales and manifest paths for subpath support Closes #174 * Move VITE_SUBPATH interface to vite-env.d.ts * Ensure production bundle always uses relative base
26 lines
677 B
TypeScript
26 lines
677 B
TypeScript
/*
|
|
* Copyright (C) Contributors to the Suwayomi project
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
/// <reference types="vite/client" />
|
|
|
|
interface ViteTypeOptions {
|
|
// By adding this line, you can make the type of ImportMetaEnv strict
|
|
// to disallow unknown keys.
|
|
strictImportMetaEnv: unknown;
|
|
}
|
|
|
|
interface ImportMetaEnv {
|
|
readonly VITE_SERVER_URL_DEFAULT: string;
|
|
readonly VITE_SUBPATH?: string;
|
|
// more env variables...
|
|
}
|
|
|
|
interface ImportMeta {
|
|
readonly env: ImportMetaEnv;
|
|
}
|