From 67c4bd604af8feb512615b98378c6a507ce2e8fe Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Mon, 13 Jan 2025 16:57:56 +0100 Subject: [PATCH] fix(vite): fix failed builds due to emotion/react alias --- vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index af3c0bbafff..531cc7e7b2d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -96,7 +96,8 @@ export default defineConfig(({ command }) => ({ }, // some sub-dependencies use a different version of @emotion/react and generate warnings // in the browser about @emotion/react loaded twice. We want to only load it once - { find: '@emotion/react', replacement: require.resolve('@emotion/react') }, + // TODO: This emotion replacement breaks builds due to @jsxImportSource in packages/grafana-ui/src/components/ThemeDemos/EmotionPerfTest.tsx + // { find: '@emotion/react', replacement: require.resolve('@emotion/react') }, // due to our webpack configuration not understanding package.json `exports` // correctly we must alias this package to the correct file // the alternative to this alias is to copy-paste the file into our