Files
sunscope/assets/js/main.js
T
fraxle 85c415d1f5 1.5.7
Profile memory
Comment cleanup
2026-05-18 23:02:41 +01:00

18 lines
789 B
JavaScript

// ------------------------------------------------------------------------
// main.js - Entry point. Imports the app and mounts it into the page.
//
// This is the file loaded by index.html as <script type="module">.
// It does nothing except wire the root component to the DOM node.
//
// If nothing appears on the page, check that:
// 1. index.html contains <div id="root"></div>
// 2. index.html loads THIS file as <script type="module" src="...">
// 3. The browser console (F12) shows no import errors
// ------------------------------------------------------------------------
import { h, render } from '../vendor/preact.js';
import { UTCIForecast } from './app.js';
const rootEl = document.getElementById('root');
if (rootEl) render(h(UTCIForecast, null), rootEl);