diff --git a/src/Integrations/Plausible.tsx b/src/Integrations/Plausible.tsx index 2b423b934e7..89d0572e9e4 100644 --- a/src/Integrations/Plausible.tsx +++ b/src/Integrations/Plausible.tsx @@ -10,9 +10,12 @@ export default function Plausible() { }); useEffect(() => { - if (!careConfig.plausible.domain || !careConfig.plausible.server) { + const missingConfig = []; + if (!careConfig.plausible.domain) missingConfig.push("domain"); + if (!careConfig.plausible.server) missingConfig.push("server"); + if (missingConfig.length > 0) { console.error( - "Plausible is not configured correctly. Please check your environment variables.", + `Plausible analytics disabled. Missing configuration: ${missingConfig.join(", ")}`, ); return; } diff --git a/vite.config.mts b/vite.config.mts index f734aa3f8c3..ca92aa50954 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -113,6 +113,12 @@ export default defineConfig(({ mode }) => { REACT_PLAUSIBLE_SITE_DOMAIN: z.string().url().optional(), REACT_PLAUSIBLE_SERVER_URL: z.string().url().optional(), + REACT_CDN_URLS: z + .string() + .optional() + .transform((val) => val?.split(" ")) + .pipe(z.array(z.string().url()).optional()) + .describe("Optional: Space-separated list of CDN URLs"), }, }), viteStaticCopy({