oidc-spa
Version:
Openidconnect client for Single Page Applications
23 lines • 669 B
JavaScript
let cache = undefined;
export function getIsDev() {
if (cache !== undefined) {
return cache;
}
const isDev = (() => {
if (/https?:\/\/localhost/.test(window.location.href)) {
return true;
}
if (typeof process === "object" &&
process !== null &&
process.env instanceof Object &&
process.env.NODE_ENV !== "production") {
return true;
}
if (document.querySelector('script[type="module"][src="/@vite/client"]') !== null) {
return true;
}
return false;
})();
return (cache = isDev);
}
//# sourceMappingURL=isDev.js.map