index.tsx
| 1 | /* @refresh reload */ |
| 2 | import { render } from "solid-js/web"; |
| 3 | import "./style.css"; |
| 4 | |
| 5 | import App from "./App"; |
| 6 | import { fillSignalCache } from "./offline"; |
| 7 | |
| 8 | const root = document.getElementById("root"); |
| 9 | if (!(root instanceof HTMLElement)) { |
| 10 | throw new Error( |
| 11 | "Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?", |
| 12 | ); |
| 13 | } |
| 14 | fillSignalCache().then(() => { |
| 15 | root.innerHTML = ""; |
| 16 | render(() => <App />, root); |
| 17 | }); |
| 18 |