import { fileURLToPath, URL } from "node:url"; import { defineConfig } from "vite"; import { nodePolyfills } from "vite-plugin-node-polyfills"; import vue from "@vitejs/plugin-vue"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue(), nodePolyfills({ include: ["stream", "util", "crypto"], exclude: ["http"], globals: { Buffer: true, global: true, process: true } }) ], server: { host: "127.0.0.1" }, resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) } }, optimizeDeps: { exclude: [], esbuildOptions: { sourcemap: false, define: { global: "globalThis" } } } });