allow host

This commit is contained in:
Samandar Turgunboyev
2025-11-10 14:32:40 +05:00
parent a0a20e9b40
commit 503452dd2c

View File

@@ -5,11 +5,7 @@ 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
],
plugins: [react(), tailwindcss(), tsconfigPaths()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
@@ -18,15 +14,16 @@ export default defineConfig({
server: {
host: true,
port: 5173,
allowedHosts: ["*"],
},
preview: {
host: true,
port: 5263,
allowedHosts: ["*"],
},
build: {
outDir: "dist", // Vercel build chiqishini shu papkadan oladi
sourcemap: false, // Agar kerak bolmasa ochirib qoying
outDir: "dist",
sourcemap: false,
},
base: "/", // <— Muhim: nisbiy yol, Vercelda assetlar togri yuklanadi
base: "/", // assetlar togri yuklanadi
});