feat: Initialize Svelte frontend with Vite, Tailwind CSS, single-file build, and a gzip script for ESP32 deployment.

This commit is contained in:
2026-03-02 20:47:52 -05:00
parent 6d457e4744
commit 1d30773234
4 changed files with 134 additions and 3 deletions

View File

@@ -1,15 +1,24 @@
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import tailwindcss from '@tailwindcss/vite'
import { viteSingleFile } from 'vite-plugin-singlefile'
// https://vite.dev/config/
export default defineConfig({
plugins: [
svelte(),
tailwindcss(),
viteSingleFile({
removeViteModuleLoader: true,
}),
],
// Resolve the W: subst drive to avoid path mismatches on Windows
resolve: {
preserveSymlinks: true,
},
build: {
// Ensure everything goes into a single chunk
cssCodeSplit: false,
assetsInlineLimit: 100000,
},
})