diff --git a/vite.config.ts b/vite.config.ts index e914423..055bbcf 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,4 +1,6 @@ import react from '@vitejs/plugin-react' +import jotaiDebugLabel from 'jotai/babel/plugin-debug-label' +import jotaiReactRefresh from 'jotai/babel/plugin-react-refresh' import { defineConfig, splitVendorChunkPlugin } from 'vite' import { VitePWA } from 'vite-plugin-pwa' import windiCSS from 'vite-plugin-windicss' @@ -8,7 +10,9 @@ export default defineConfig( env => ({ plugins: [ // only use react-fresh - env.mode === 'development' && react(), + env.mode === 'development' && react({ + babel: { plugins: [jotaiDebugLabel, jotaiReactRefresh] }, + }), tsConfigPath(), windiCSS(), VitePWA({