mirror of
https://github.com/outline/outline.git
synced 2026-11-21 05:24:03 +03:00
21 lines
497 B
TypeScript
21 lines
497 B
TypeScript
declare global {
|
|
interface Window {
|
|
env: Record<string, any>;
|
|
}
|
|
}
|
|
|
|
if (!window.env) {
|
|
throw new Error(
|
|
"Config could not be parsed. \nSee: https://docs.getoutline.com/s/hosting/doc/troubleshooting-HXckrzCqDJ#h-config-could-not-be-parsed"
|
|
);
|
|
}
|
|
|
|
const env: Record<string, any> = {
|
|
...window.env,
|
|
isDevelopment: window.env.ENVIRONMENT === "development",
|
|
isTest: window.env.ENVIRONMENT === "test",
|
|
isProduction: window.env.ENVIRONMENT === "production",
|
|
};
|
|
|
|
export default env;
|