fix(vite): fix failed builds due to emotion/react alias

This commit is contained in:
Jack Westbrook
2025-03-03 09:52:53 +01:00
parent 9bbbdd3d6e
commit 67c4bd604a
+2 -1
View File
@@ -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