Fix: replace @/* path alias with relative imports for Docker compat
Vite's path alias resolution worked locally but consistently failed in the Docker stage with "Could not load /web/src/lib/utils ... ENOENT" even after fixing __dirname for ESM. Some interaction between act/buildx and Vite's resolver around tsconfig paths. Relative imports sidestep the issue entirely and are explicit about the dependency direction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+7
-7
@@ -1,19 +1,19 @@
|
||||
import { useMemo, useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { Building2, Gavel, MapPin } from "lucide-react";
|
||||
import { api } from "@/api/client";
|
||||
import { api } from "./api/client";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { SearchBar, SearchQuery } from "@/components/SearchBar";
|
||||
import { DealsTable } from "@/components/DealsTable";
|
||||
import { AppraisalsTable } from "@/components/AppraisalsTable";
|
||||
} from "./components/ui/card";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/ui/tabs";
|
||||
import { Skeleton } from "./components/ui/skeleton";
|
||||
import { SearchBar, SearchQuery } from "./components/SearchBar";
|
||||
import { DealsTable } from "./components/DealsTable";
|
||||
import { AppraisalsTable } from "./components/AppraisalsTable";
|
||||
|
||||
function useAddressInfo(address: string | undefined) {
|
||||
return useQuery({
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Download, FileText } from "lucide-react";
|
||||
import { AppraisalDecision } from "@/api/types";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { api } from "@/api/client";
|
||||
import { formatDate } from "@/lib/utils";
|
||||
import { AppraisalDecision } from "../api/types";
|
||||
import { Button } from "./ui/button";
|
||||
import { api } from "../api/client";
|
||||
import { formatDate } from "../lib/utils";
|
||||
|
||||
interface Props {
|
||||
decisions: AppraisalDecision[];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Deal } from "@/api/types";
|
||||
import { formatCurrencyILS, formatDate, formatNumber } from "@/lib/utils";
|
||||
import { Deal } from "../api/types";
|
||||
import { formatCurrencyILS, formatDate, formatNumber } from "../lib/utils";
|
||||
|
||||
interface Props {
|
||||
deals: Deal[];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useState } from "react";
|
||||
import { Search } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Button } from "./ui/button";
|
||||
import { Input } from "./ui/input";
|
||||
import { Label } from "./ui/label";
|
||||
|
||||
export type SearchMode = "address" | "block_plot" | "appraiser";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react";
|
||||
import { Slot } from "@radix-ui/react-slot";
|
||||
import { cva, type VariantProps } from "class-variance-authority";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
||||
({ className, ...props }, ref) => (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
const Input = React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>(
|
||||
({ className, type, ...props }, ref) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react";
|
||||
import * as LabelPrimitive from "@radix-ui/react-label";
|
||||
import { cva, type VariantProps } from "class-variance-authority";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
const labelVariants = cva(
|
||||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
|
||||
return <div className={cn("animate-pulse rounded-md bg-muted", className)} {...props} />;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
const Tabs = TabsPrimitive.Root;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user