0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/experience/src/index.html

33 lines
906 B
HTML
Raw Normal View History

2022-02-17 18:25:54 -05:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title></title>
2024-07-08 03:52:15 -05:00
<!-- Preload well-known APIs -->
<script>
2024-07-08 03:52:15 -05:00
const searchParams = new URLSearchParams(window.location.search);
const isPreview = searchParams.has('preview');
// Preview mode does not query phrases
const preLoadLinks = isPreview ? [] : ['/api/.well-known/phrases'];
preLoadLinks.forEach((linkUrl) => {
const link = document.createElement('link');
link.rel = 'preload';
2024-07-08 03:52:15 -05:00
link.href = linkUrl;
link.as = 'fetch';
link.crossOrigin = 'anonymous';
document.head.appendChild(link);
});
</script>
2022-02-17 18:25:54 -05:00
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app"></div>
<script type="module" src="index.tsx"></script>
</body>
</html>