Files
OpenBB/frontend-components/plotly/vite.config.ts
Danglewood 9fb0f336be [BugFix] update frontend-components and build new plotly and table html assets (#7007)
* update frontend-components and build new plotly and table html assets

* codespell for some reason

* too-many-positional-arguments
2025-01-23 07:30:33 +00:00

23 lines
530 B
TypeScript
Vendored

import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { viteSingleFile } from "vite-plugin-singlefile";
const stripUseClientDirective = () => {
return {
name: 'strip-use-client',
transform(code) {
if (code.includes('use client')) {
return {
code: code.replace(/"use client"/, ''),
map: null
}
}
}
}
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), stripUseClientDirective(), viteSingleFile()],
});