Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(build): migrate JSX config from deprecated esbuild to oxc
Elian Doranba13046a67dc
diff --git a/apps/client/vite.config.mts b/apps/client/vite.config.mtsindex 202f836494..3b7dabd9e8 100644--- a/apps/client/vite.config.mts+++ b/apps/client/vite.config.mts@@ -46,11 +46,13 @@ export default defineConfig(() => ({cacheDir: '../../.cache/vite',base: "",plugins,- // Use esbuild for JSX transformation (much faster than Babel)- esbuild: {- jsx: 'automatic',- jsxImportSource: 'preact',- jsxDev: isDev+ // Use oxc for JSX transformation (Vite 8+ replaced the deprecated `esbuild` option with `oxc`)+ oxc: {+ jsx: {+ runtime: 'automatic',+ importSource: 'preact',+ development: isDev+ }},css: {transformer: 'lightningcss',diff --git a/apps/standalone/vite.config.mts b/apps/standalone/vite.config.mtsindex b77bec568a..9d83b97cdb 100644--- a/apps/standalone/vite.config.mts+++ b/apps/standalone/vite.config.mts@@ -218,10 +218,13 @@ export default defineConfig(() => ({cacheDir: '../../../node_modules/.vite/apps/standalone',base: "",plugins,- esbuild: {- jsx: 'automatic',- jsxImportSource: 'preact',- jsxDev: isDev+ // Use oxc for JSX transformation (Vite 8+ replaced the deprecated `esbuild` option with `oxc`)+ oxc: {+ jsx: {+ runtime: 'automatic',+ importSource: 'preact',+ development: isDev+ }},css: {transformer: 'lightningcss',