@@ -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 yo‘llarini avtomatik o‘qish
|
||||
],
|
||||
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 bo‘lmasa o‘chirib qo‘ying
|
||||
outDir: "dist",
|
||||
sourcemap: false,
|
||||
},
|
||||
base: "/", // <— Muhim: nisbiy yo‘l, Vercel’da assetlar to‘g‘ri yuklanadi
|
||||
base: "/", // ✅ assetlar to‘g‘ri yuklanadi
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user