coracle/src/main.js

25 lines
586 B
JavaScript
Raw Normal View History

2023-03-08 14:02:18 +00:00
import "src/app.css"
2023-01-16 22:54:03 +00:00
import Bugsnag from "@bugsnag/js"
2023-04-12 19:39:34 +00:00
import App from "src/app/App.svelte"
import {installPrompt} from "src/partials/state"
2023-01-21 19:15:10 +00:00
2023-06-10 15:28:02 +00:00
if (import.meta.env.VITE_BUGSNAG_API_KEY) {
Bugsnag.start({
apiKey: import.meta.env.VITE_BUGSNAG_API_KEY,
collectUserIp: false,
})
}
2023-01-21 19:15:10 +00:00
2023-02-27 21:44:05 +00:00
window.addEventListener("beforeinstallprompt", e => {
// Prevent Chrome 67 and earlier from automatically showing the prompt
e.preventDefault()
2022-11-23 01:28:33 +00:00
2023-02-27 21:44:05 +00:00
// Stash the event so it can be triggered later.
installPrompt.set(e)
2022-11-23 01:28:33 +00:00
})
2023-02-27 21:44:05 +00:00
export default new App({
2023-03-08 14:02:18 +00:00
target: document.getElementById("app"),
2023-02-27 21:44:05 +00:00
})