allow host
This commit is contained in:
@@ -5,11 +5,7 @@ import { defineConfig } from "vite";
|
|||||||
import tsconfigPaths from "vite-tsconfig-paths";
|
import tsconfigPaths from "vite-tsconfig-paths";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [react(), tailwindcss(), tsconfigPaths()],
|
||||||
react(), // React uchun
|
|
||||||
tailwindcss(), // Tailwind CSS integratsiyasi
|
|
||||||
tsconfigPaths(), // @ alias yo‘llarini avtomatik o‘qish
|
|
||||||
],
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"@": path.resolve(__dirname, "./src"),
|
"@": path.resolve(__dirname, "./src"),
|
||||||
@@ -18,15 +14,16 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
host: true,
|
host: true,
|
||||||
port: 5173,
|
port: 5173,
|
||||||
|
allowedHosts: ["*"],
|
||||||
},
|
},
|
||||||
preview: {
|
preview: {
|
||||||
host: true,
|
host: true,
|
||||||
port: 5263,
|
port: 5263,
|
||||||
|
allowedHosts: ["*"],
|
||||||
},
|
},
|
||||||
|
|
||||||
build: {
|
build: {
|
||||||
outDir: "dist", // Vercel build chiqishini shu papkadan oladi
|
outDir: "dist",
|
||||||
sourcemap: false, // Agar kerak bo‘lmasa o‘chirib qo‘ying
|
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