gradio/js/component-test/vite.config.js
pngwn 5bf00b7524
make all component SSR compatible (#9187)
* 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>
2024-08-31 06:19:51 +00:00

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: ["../.."]
}
}
});