mirror of
https://github.com/isledecomp/isle.pizza.git
synced 2026-02-28 22:07:39 +00:00
- Replace vanilla JS with Svelte 5 components - Add Vite build system with Terser optimization - Reorganize assets into src/ and public/ directories - Update README with setup instructions
28 lines
700 B
JavaScript
28 lines
700 B
JavaScript
import App from './App.svelte';
|
|
import { mount } from 'svelte';
|
|
import './app.css';
|
|
|
|
// Global Module object required by Emscripten - must be defined before isle.js loads
|
|
window.Module = {
|
|
arguments: ['--ini', '/config/isle.ini'],
|
|
running: false,
|
|
preRun: function () {
|
|
window.Module["addRunDependency"]("isle");
|
|
window.Module.running = true;
|
|
},
|
|
canvas: null, // Will be set after mount
|
|
onExit: function () {
|
|
window.location.reload();
|
|
}
|
|
};
|
|
|
|
// Mount Svelte app
|
|
const app = mount(App, {
|
|
target: document.getElementById('app')
|
|
});
|
|
|
|
// Set canvas reference after mount
|
|
window.Module.canvas = document.getElementById('canvas');
|
|
|
|
export default app;
|