Files
OpenBB/desktop/vite.config.ts
Danglewood 039c183c60 [Feature] Open Data Platform Desktop Application (#7238)
* add desktop app code to repository

* fix headers

* bump version

* one more file to bump version in

* cargo fmt

* add permissions to release jobs

* codespell

* Need this folder to exist

* NSNumber apparently

* cargo fmt

* test expectation that didn't get updated

* intel mac runner is macos-15-intel

* empty line at bottom of file..

* apparently didn't save permissions step

* unused windows import

* cargo fmt again

* draft-release workflow

* fix windows test

* try as reusable workflow

* beforeBundleCommand

* relative path

* absolute path...

* the file definitely exists...

* seems that the file was not actually added....

* this file definitely exists

* undo temp edit of draft-release
2025-10-14 15:52:04 +00:00

63 lines
1.5 KiB
TypeScript
Vendored

import path from "node:path";
import { tanstackRouter } from "@tanstack/router-vite-plugin";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { viteStaticCopy } from "vite-plugin-static-copy";
import svgr from "vite-plugin-svgr";
const host = process.env.TAURI_DEV_HOST;
export default defineConfig(async () => ({
resolve: {
alias: {
"~": path.resolve(__dirname, "./src"),
},
},
plugins: [
react(),
svgr(),
viteStaticCopy({
targets: [{ src: "./node_modules/@openbb/ui-pro/dist/assets", dest: "" }],
}),
tanstackRouter(),
],
base: "./",
build: {
outDir: "dist",
emptyOutDir: true,
sourcemap: true,
chunkSizeWarningLimit: 1000, // Increase chunk size warning limit to 1MB
rollupOptions: {
output: {
manualChunks(id: string) {
if (id.includes('node_modules')) {
if (id.includes('@openbb')) {
return 'vendor-openbb';
}
if (id.includes('@tanstack')) {
return 'vendor-tanstack';
}
return 'vendor';
}
}
}
}
},
clearScreen: false,
server: {
port: 1470,
strictPort: true,
host: host || false,
hmr: host
? {
protocol: "ws",
host,
port: 1421,
}
: undefined,
watch: {
ignored: ["**/src-tauri/**"],
},
},
}));