Download frontend-components/plotly/vite.config.ts from CatPtain/OpenBB: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/spaces/CatPtain/OpenBB/resolve/main/frontend-components/plotly/vite.config.ts
- Command line
-
hf download hf://spaces/CatPtain/OpenBB/frontend-components/plotly/vite.config.ts
-
curl -L -o vite.config.ts https://huggingface.co/spaces/CatPtain/OpenBB/resolve/main/frontend-components/plotly/vite.config.ts
530 Bytes
| 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()], | |
| }); | |