Skip to content

Commit 50b8079

Browse files
committed
#RI-5411 - fix pr comments
1 parent 1008d52 commit 50b8079

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

redisinsight/ui/src/packages/vite.config.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { ViteEjsPlugin } from 'vite-plugin-ejs'
66
import { viteStaticCopy } from 'vite-plugin-static-copy'
77
import { resolve } from 'path'
88

9-
const pluginsDir = [
10-
'redisearch',
11-
'clients-list',
12-
'redisgraph',
13-
'redistimeseries-app',
14-
'ri-explain',
9+
const riPlugins = [
10+
{ name: 'redisearch', entry: 'src/main.tsx' },
11+
{ name: 'clients-list', entry: 'src/main.tsx' },
12+
{ name: 'redisgraph', entry: 'src/main.tsx' },
13+
{ name: 'redistimeseries-app', entry: 'src/main.tsx' },
14+
{ name: 'ri-explain', entry: 'src/main.tsx' },
1515
]
1616

1717
/**
@@ -26,7 +26,7 @@ export default defineConfig({
2626
// Copy public static for all plugins
2727
viteStaticCopy({
2828
silent: true,
29-
targets: pluginsDir.map((pluginDir) => ({
29+
targets: riPlugins.map(({ name: pluginDir }) => ({
3030
src: `./${pluginDir}/public/*`,
3131
dest: `./${pluginDir}/dist/`,
3232
}))
@@ -53,7 +53,7 @@ export default defineConfig({
5353
lib: {
5454
// Multi entries
5555
entry: Object.fromEntries(
56-
pluginsDir.map((pluginDir) => [pluginDir, resolve(__dirname, `./${pluginDir}/src/main.tsx`)])
56+
riPlugins.map(({ name: pluginDir, entry }) => [pluginDir, resolve(__dirname, `./${pluginDir}/${entry}`)])
5757
),
5858
},
5959

0 commit comments

Comments
 (0)