Switch to Preact!!!

This commit is contained in:
Gregory Schier
2023-03-09 00:47:25 -08:00
parent 17c734af11
commit 5fbc5edb15
29 changed files with 349 additions and 553 deletions

View File

@@ -1,11 +1,11 @@
import preact from '@preact/preset-vite';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { ViteRsw } from 'vite-plugin-rsw';
import topLevelAwait from 'vite-plugin-top-level-await';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), ViteRsw(), topLevelAwait()],
plugins: [preact({ devToolsEnabled: true }), ViteRsw(), topLevelAwait()],
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
// prevent vite from obscuring rust errors
@@ -15,6 +15,7 @@ export default defineConfig({
port: 1420,
strictPort: true,
},
// to make use of `TAURI_DEBUG` and other env variables
// https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
envPrefix: ['VITE_', 'TAURI_'],