rename file and do dom element check
This commit is contained in:
10
src/main.ts
10
src/main.ts
@@ -1,8 +1,14 @@
|
||||
import './styles.postcss';
|
||||
import './styles.pcss';
|
||||
import App from './App.svelte';
|
||||
|
||||
const target = document.getElementById('app');
|
||||
if (!target)
|
||||
throw new Error(
|
||||
"The element with id of 'app' wasn't found on the base html file."
|
||||
);
|
||||
|
||||
const app = new App({
|
||||
target: document.getElementById('app'),
|
||||
target,
|
||||
intro: true
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user