You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
527 B

import "./app.css";
import App from "./App.svelte";
/* const app = new App({
target: document.getElementById('app'),
})
export default app */
export default ({ root }: { root: HTMLElement }) => {
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
throw new Error(
"Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got mispelled?",
);
}
//@ts-ignore deez nuts
const app = new App({
target: root,
});
return () => root.innerHTML = "";
};