npx degit solidjs/templates/ts-unocss solid-ts

This commit is contained in:
严浩
2024-08-05 11:08:29 +08:00
commit 81b11953e1
10 changed files with 1867 additions and 0 deletions

14
src/index.tsx Normal file
View File

@@ -0,0 +1,14 @@
import 'uno.css';
import { render } from 'solid-js/web';
import App from './App';
const root = document.getElementById('root');
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 misspelled?',
);
}
render(() => <App />, root!);