mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-09 02:00:44 +08:00
26 lines
450 B
TypeScript
26 lines
450 B
TypeScript
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");
|
|
}
|
|
};
|
|
}
|