Update vite config to have hot reload with preact

This commit is contained in:
Arnaud 2024-11-22 09:35:22 +01:00
parent 5a64c1a93b
commit 10de82b1c4
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -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: {