From 10de82b1c4b9354373465f9f89d6c62f4a1c2516 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 22 Nov 2024 09:35:22 +0100 Subject: [PATCH] Update vite config to have hot reload with preact --- vite.config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 11dbd9c..b3c28f0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,11 +1,12 @@ -import react from "@vitejs/plugin-react"; +// import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; import packageJson from "./package.json"; import svgr from "vite-plugin-svgr"; +import preact from '@preact/preset-vite' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react(), svgr({ + plugins: [preact(), svgr({ svgrOptions: { plugins: ["@svgr/plugin-svgo", "@svgr/plugin-jsx"], svgoConfig: {