From dbf14d3a26e7e0d92ecd96e1e807ed2e763a6ec0 Mon Sep 17 00:00:00 2001 From: Davide Segullo Date: Wed, 30 Oct 2024 18:01:59 +0100 Subject: [PATCH] fix(react): :bug: fix next 15 runtime error --- nx.json | 5 +++++ packages/react/vite.config.ts | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/nx.json b/nx.json index 5c82b28..7c44474 100644 --- a/nx.json +++ b/nx.json @@ -6,6 +6,11 @@ "dependsOn": ["^build"], "inputs": ["production", "^production"] }, + "@nx/vite:build": { + "cache": true, + "dependsOn": ["^build"], + "inputs": ["production", "^production"] + }, "@nx/vite:test": { "cache": true, "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"] diff --git a/packages/react/vite.config.ts b/packages/react/vite.config.ts index 80a3849..0cd325d 100644 --- a/packages/react/vite.config.ts +++ b/packages/react/vite.config.ts @@ -10,9 +10,7 @@ export default defineConfig({ cacheDir: '../../node_modules/.vite/react', plugins: [ - react({ - jsxRuntime: 'classic', - }), + react(), nxViteTsPaths(), dts({ entryRoot: 'src', @@ -28,6 +26,9 @@ export default defineConfig({ // Configuration for building your library. // See: https://vitejs.dev/guide/build.html#library-mode + esbuild: { + jsxDev: false, + }, build: { outDir: '../../dist/packages/react', emptyOutDir: true,