mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
5bf00b7524
* asd * fixes * make all components ssr compatible * remove files * add changeset * add changeset * review * format * clean * address comments * tweaks utils * add changeset * fix plot and audio * format * fix nativeplot --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
42 lines
775 B
JavaScript
42 lines
775 B
JavaScript
import { sveltekit } from "@sveltejs/kit/vite";
|
|
import { defineConfig } from "vite";
|
|
import {
|
|
generate_cdn_entry,
|
|
generate_dev_entry,
|
|
handle_ce_css,
|
|
inject_component_loader,
|
|
inject_ejs,
|
|
mock_modules,
|
|
resolve_svelte
|
|
} from "@self/build";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
|
|
export default defineConfig({
|
|
plugins: [sveltekit()],
|
|
|
|
resolve: {
|
|
conditions: ["gradio"],
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url))
|
|
}
|
|
},
|
|
optimizeDeps: {
|
|
exclude: [
|
|
"@gradio/video",
|
|
"@ffmpeg/ffmpeg",
|
|
"@ffmpeg/util",
|
|
"@gradio/utils"
|
|
]
|
|
},
|
|
assetsInclude: ["**/*.glb"],
|
|
server: {
|
|
headers: {
|
|
"Cross-Origin-Opener-Policy": "same-origin",
|
|
"Cross-Origin-Embedder-Policy": "require-corp"
|
|
},
|
|
fs: {
|
|
allow: ["../.."]
|
|
}
|
|
}
|
|
});
|