-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathindex.html
38 lines (36 loc) · 1.15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OneSignal Dev</title>
<script>
window.OneSignalDeferred = window.OneSignalDeferred || [];
// set can a query param ?app_id=your_app_id OR
// create an .env file and set VITE_APP_ID to your app id
const appId =
new URLSearchParams(window.location.search).get('app_id') ||
'%VITE_APP_ID%';
OneSignalDeferred.push(async function (OneSignal) {
await OneSignal.init({
appId,
});
});
</script>
</head>
<body>
<script type="module" src="/src/entries/pageSdkInit.ts"></script>
<h1>OneSignal Dev</h1>
<p>
This html file is for local development with hot-reloading. To preview the
bundle, it will use a separate html file in the preview folder.
</p>
<script>
// To check against race conditions
// OneSignalDeferred.push(async function (OneSignal) {
// await OneSignal.logout();
// });
</script>
</body>
</html>