Skip to content

Commit 03b4369

Browse files
committed
#CR-10 - Move to vite
1 parent 352c071 commit 03b4369

File tree

4 files changed

+28
-10
lines changed

4 files changed

+28
-10
lines changed

.circleci/build/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ yarn --cwd redisinsight/api
77

88
# build
99
yarn build:statics
10-
yarn build:web
10+
yarn build:ui
1111
yarn --cwd ./redisinsight/api build:prod

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ COPY redisinsight ./redisinsight
2929
RUN yarn --cwd redisinsight/api install
3030

3131
# build the frontend, static assets, and backend api
32-
RUN yarn build:web
32+
RUN yarn build:ui
3333
RUN yarn build:statics
3434
RUN yarn build:api
3535

redisinsight/ui/vite.config.mjs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from 'vite'
1+
import { defineConfig, splitVendorChunkPlugin } from 'vite'
22
import react from '@vitejs/plugin-react'
33
import svgr from 'vite-plugin-svgr'
44
import monacoEditorPlugin from 'vite-plugin-monaco-editor'
@@ -17,6 +17,7 @@ export default defineConfig({
1717
languages: ['json', 'javascript', 'typescript'],
1818
features: ['!rename'],
1919
}),
20+
splitVendorChunkPlugin(),
2021
],
2122
resolve: {
2223
alias: {
@@ -42,6 +43,26 @@ export default defineConfig({
4243
outDir: './dist',
4344
target: 'es2020',
4445
minify: 'esbuild',
46+
rollupOptions: {
47+
output: {
48+
// TODO chunks
49+
// manualChunks(id) {
50+
// if (id.includes('react')) {
51+
// return 'react'
52+
// }
53+
// if (id.includes('elastic')) {
54+
// return 'elastic'
55+
// }
56+
// if (id.includes('lodash')) {
57+
// return 'lodash'
58+
// }
59+
// if (id.includes('monaco')) {
60+
// return 'monaco'
61+
// }
62+
// return 'index'
63+
// },
64+
},
65+
},
4566
define: {
4667
'window.app.config.apiPort': '5540',
4768
this: 'window',
@@ -80,7 +101,6 @@ export default defineConfig({
80101
RI_PIPELINE_COUNT_DEFAULT: '5',
81102
RI_SCAN_COUNT_DEFAULT: '500',
82103
RI_SCAN_TREE_COUNT_DEFAULT: '10000',
83-
RI_SEGMENT_WRITE_KEY: 'MWGOG146oPdLSWO5mZy3eM1NzcC3alRF',
84104
RI_CONNECTIONS_TIMEOUT_DEFAULT: 30 * 1000,
85105
},
86106
// 'process.env.NODE_ENV': isProduction ? 'production' : undefined,

yarn.lock

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12831,7 +12831,7 @@ rimraf@^2.6.3:
1283112831
dependencies:
1283212832
glob "^7.1.3"
1283312833

12834-
rimraf@^3.0.0, rimraf@^3.0.2:
12834+
rimraf@^3.0.2:
1283512835
version "3.0.2"
1283612836
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
1283712837
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
@@ -14081,11 +14081,9 @@ tmp@^0.0.33:
1408114081
os-tmpdir "~1.0.2"
1408214082

1408314083
tmp@^0.2.0:
14084-
version "0.2.1"
14085-
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14"
14086-
integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==
14087-
dependencies:
14088-
rimraf "^3.0.0"
14084+
version "0.2.3"
14085+
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae"
14086+
integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==
1408914087

1409014088
1409114089
version "1.0.5"

0 commit comments

Comments
 (0)