feat: vite+svelte+tailwind setup

This commit is contained in:
Timothy Jaeryang Baek
2025-01-08 19:15:46 -08:00
parent 1d0bd81560
commit c57cea5932
11 changed files with 1147 additions and 181 deletions

View File

@@ -1,7 +0,0 @@
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
Arial, sans-serif;
margin: auto;
max-width: 38rem;
padding: 2rem;
}

11
src/render/App.svelte Normal file
View File

@@ -0,0 +1,11 @@
<script lang="ts">
import { onMount } from "svelte";
onMount(() => {
console.log("Mounted");
});
</script>
<main>
<div class=" text-xl font-bold">Open WebUI App</div>
</main>

1
src/render/app.css Normal file
View File

@@ -0,0 +1 @@
@import "tailwindcss";

View File

@@ -1,31 +1,9 @@
/**
* This file will automatically be loaded by vite and run in the "renderer" context.
* To learn more about the differences between the "main" and the "renderer" context in
* Electron, visit:
*
* https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes
*
* By default, Node.js integration in this file is disabled. When enabling Node.js integration
* in a renderer process, please be aware of potential security implications. You can read
* more about security risks here:
*
* https://electronjs.org/docs/tutorial/security
*
* To enable Node.js integration in this file, open up `main.ts` and enable the `nodeIntegration`
* flag:
*
* ```
* // Create the browser window.
* mainWindow = new BrowserWindow({
* width: 800,
* height: 600,
* webPreferences: {
* nodeIntegration: true
* }
* });
* ```
*/
import { mount } from 'svelte'
import './render/app.css'
import App from './render/App.svelte'
import './index.css';
const app = mount(App, {
target: document.getElementById('app'),
})
console.log('👋 This message is being logged by "renderer.ts", included via Vite');
export default app