Files
simple-admin/vite.config.ts
Samandar Turgunboyev a0a20e9b40 allow host
2025-11-10 14:22:20 +05:00

33 lines
812 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [
react(), // React uchun
tailwindcss(), // Tailwind CSS integratsiyasi
tsconfigPaths(), // @ alias yollarini avtomatik oqish
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
host: true,
port: 5173,
},
preview: {
host: true,
port: 5263,
},
build: {
outDir: "dist", // Vercel build chiqishini shu papkadan oladi
sourcemap: false, // Agar kerak bolmasa ochirib qoying
},
base: "/", // <— Muhim: nisbiy yol, Vercelda assetlar togri yuklanadi
});