view vite.config.ts @ 43:a7b644dc1b4b

ridiculous fix for vite not proxying urls with . in them
author drewp@bigasterisk.com
date Fri, 06 Dec 2024 00:58:46 -0800
parents f0a773084a2e
children
line wrap: on
line source

import { defineConfig } from "vite";
import pluginRewriteAll from "vite-plugin-rewrite-all";

export default defineConfig({
  base: "/video/",
  server: {
    host: "0.0.0.0",
    strictPort: true,
    port: 8002,
    hmr: { path: "vite-ws" },
    fs: {
      allow: [
        // these are relative to config.root which is ./src/
        ".",
        "../node_modules",
      ],
    },
  },
  root: "src",
  build: {
    assetsDir: "src",
    target: "esnext",
    lib: {
      entry: "src/index.ts",
      formats: ["es"],
    },
  },
  define: {
    global: {},
  },
  plugins: [pluginRewriteAll()],
});