Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken Hot Reload of Plexus Package #2089

Merged
merged 11 commits into from
Jan 7, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import * as React from 'react';
import { Card, Button, Tooltip } from 'antd';
import { IoClose, IoHelpCircleOutline } from 'react-icons/io5';
import cx from 'classnames';
import { Digraph, LayoutManager } from '@jaegertracing/plexus';
import cacheAs from '@jaegertracing/plexus/lib/cacheAs';
import { Digraph, LayoutManager, cacheAs } from '@jaegertracing/plexus';

import {
getNodeRenderer,
Expand Down
7 changes: 7 additions & 0 deletions packages/jaeger-ui/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import react from '@vitejs/plugin-react';
import legacy from '@vitejs/plugin-legacy';
import vitePluginImp from 'vite-plugin-imp';
import { visualizer } from 'rollup-plugin-visualizer';
import path from 'path';

const proxyConfig = {
target: 'http://localhost:16686',
Expand Down Expand Up @@ -86,4 +87,10 @@ export default defineConfig({
transformMixedEsModules: true,
},
},
resolve: {
alias: {
// allow hot reload of Plexus code -- https://github.com/jaegertracing/jaeger-ui/pull/2089
'@jaegertracing/plexus': path.resolve(__dirname, '../plexus/src'),
Wise-Wizard marked this conversation as resolved.
Show resolved Hide resolved
},
},
});