mirror of
https://github.com/barthuijgen/factorio-sites.git
synced 2024-12-12 11:45:22 +02:00
fix: build time error when missing env variables
This commit is contained in:
parent
71a3d6a887
commit
d8895430e3
@ -1,5 +1,7 @@
|
||||
import getConfig from "next/config";
|
||||
const { publicRuntimeConfig } = getConfig();
|
||||
|
||||
export const PUBLIC_URL = (publicRuntimeConfig.PUBLIC_URL as string) || "";
|
||||
export const CF_WEB_ANALYTICS = (publicRuntimeConfig.CF_WEB_ANALYTICS as string) || null;
|
||||
const config = publicRuntimeConfig || {};
|
||||
|
||||
export const PUBLIC_URL = (config.PUBLIC_URL as string) || "";
|
||||
export const CF_WEB_ANALYTICS = (config.CF_WEB_ANALYTICS as string) || null;
|
||||
|
Loading…
Reference in New Issue
Block a user