gradio / _frontend_code /preview /vite.config.ts
hd0013's picture
Upload folder using huggingface_hub
8fdc036 verified
raw
history blame contribute delete
No virus
450 Bytes
import { defineConfig } from "vite";
import { cpSync } from "fs";
export default defineConfig({
build: {
lib: {
entry: "./src/index.ts",
formats: ["es"]
},
outDir: "dist",
rollupOptions: {
external: ["fsevents", "vite", "@sveltejs/vite-plugin-svelte"]
}
},
plugins: [copy_files()]
});
export function copy_files() {
return {
name: "copy_files",
writeBundle() {
cpSync("./src/examine.py", "dist/examine.py");
}
};
}