mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
* Updated Story book to the latest one * Updated tailwindcss related packages and config * Fixed Storybook * Added missed colors * Fixed CSS for the error dialog
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import { defineConfig, loadEnv } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), "");
|
|
const port = env.VITE_SERVER_PORT || 8080;
|
|
return {
|
|
plugins: [
|
|
react(),
|
|
viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: 'public/analytics.js',
|
|
dest: "assets/",
|
|
},
|
|
{
|
|
src: 'public/openapi.json',
|
|
dest: "assets/",
|
|
},
|
|
{
|
|
src: 'public/logo.svg',
|
|
dest: "assets/",
|
|
},
|
|
]
|
|
})
|
|
],
|
|
build: {
|
|
assetsDir: "./assets/",
|
|
outDir: "../pkg/frontend/dist",
|
|
emptyOutDir: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
react: ['react', 'react-dom', 'react-router-dom'],
|
|
vendors: ['luxon','highlight.js','diff2html','swagger-ui-react']
|
|
}
|
|
}
|
|
}
|
|
},
|
|
css: {
|
|
postcss: './postcss.config.cjs'
|
|
},
|
|
server: {
|
|
proxy: {
|
|
"^/api/.*": `http://127.0.0.1:${port}`,
|
|
"^/status*": `http://127.0.0.1:${port}`,
|
|
"^/diff*": `http://127.0.0.1:${port}`,
|
|
"^/static*": `http://127.0.0.1:${port}`,
|
|
},
|
|
},
|
|
};
|
|
});
|