From 2a8ff1804118d9531e9e021c8af75b298619a329 Mon Sep 17 00:00:00 2001 From: Fractal-Tess Date: Thu, 18 May 2023 06:50:33 +0300 Subject: [PATCH] rename file and do dom element check --- src/main.ts | 10 ++++++++-- src/{styles.postcss => styles.pcss} | 0 2 files changed, 8 insertions(+), 2 deletions(-) rename src/{styles.postcss => styles.pcss} (100%) diff --git a/src/main.ts b/src/main.ts index 4ce7112..8efb4f7 100644 --- a/src/main.ts +++ b/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 }); diff --git a/src/styles.postcss b/src/styles.pcss similarity index 100% rename from src/styles.postcss rename to src/styles.pcss