Spaces:
Runtime error
Runtime error
File size: 731 Bytes
549f7f3 d80bf49 549f7f3 d80bf49 549f7f3 d80bf49 549f7f3 d80bf49 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import tailwindcss from "@tailwindcss/vite";
import wasm from "vite-plugin-wasm";
// `@rerun-io/web-viewer` uses `new URL("./re_viewer_bg.wasm", import.meta.url)` since 0.17,
// which does not play well with `vite dev`: https://github.com/rerun-io/rerun/issues/6815
// we need to patch the config, but `gradio` does not let us directly set the `optimize` option.
/** @type {() => import("vite").Plugin} */
const hack = () => ({
config() {
return {
optimizeDeps: {
exclude: process.env.NODE_ENV === "production" ? [] : ["@rerun-io/web-viewer"],
},
};
},
});
export default {
plugins: [wasm(), tailwindcss(), hack()],
svelte: {
preprocess: [],
},
build: {
target: "esnext",
},
};
|