FROM node:20-alpine

RUN corepack enable && corepack prepare pnpm@latest --activate

WORKDIR /app

COPY package.json pnpm-lock.yaml* ./
RUN pnpm install

# Only copy necessary source files, excluding public
COPY src/ ./src/
COPY index.html tsconfig.json vite.config.ts ./

EXPOSE 5173

CMD ["pnpm", "dev"]
