vite environment variables, also typed

This commit is contained in:
2026-02-23 20:21:24 +01:00
parent 4b68a4ad7c
commit b30c068f9e
4 changed files with 15 additions and 13 deletions

View File

@@ -85,8 +85,9 @@
query.value = decodeURIComponent(params.get("query"));
}
const { ELASTIC } = process.env;
if (ELASTIC === undefined || ELASTIC === "") {
const ELASTIC_URL = import.meta.env.VITE_ELASTIC_URL;
const ELASTIC_API_KEY = import.meta.env.VITE_ELASTIC_API_KEY;
if (!ELASTIC_URL || !ELASTIC_API_KEY) {
disabled.value = true;
}