Skip to content

Commit

Permalink
Workaround antd v3 error in the production build (jaegertracing#1276)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Unbreak the UI in the production build (closes jaegertracing#1275)
## Short description of the changes
It seems that the antd v3 upgrade in
cda1746 causes an error in the
production build, apparently due to a bad interplay with vite/esbuild
bundling. As a workaround, provide an import alias for the antd icon
sprite file that's causing the issue.[1]

---
[1]
ant-design/ant-design#19002 (comment)

Signed-off-by: Máté Szabó <mszabo@fandom.com>
  • Loading branch information
mszabo-wikia authored and Benjamin Klein committed Apr 18, 2023
1 parent d379b31 commit 22a59cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/jaeger-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ export default defineConfig({
__REACT_APP_VSN_STATE__: JSON.stringify(process.env.REACT_APP_VSN_STATE || ''),
__APP_ENVIRONMENT__: JSON.stringify(process.env.NODE_ENV || 'development'),
},
// Workaround an imports issue with antd v3 that causes an error in the production build.
// https://github.com/ant-design/ant-design/issues/19002
resolve: {
alias: {
'@ant-design/icons/lib/dist': '@ant-design/icons/lib/index.es.js',
},
},
plugins: [
react(),
legacy({
Expand Down

0 comments on commit 22a59cd

Please sign in to comment.