From acb8103ba6b75d390b36104ebf6b9c97ded9416c Mon Sep 17 00:00:00 2001 From: smfahim25 Date: Thu, 20 Mar 2025 11:58:26 +0600 Subject: [PATCH] update docker file --- Dockerfile | 4 ---- src/components/Panel/TextPanel.jsx | 7 ++++--- vite.config.js | 13 +++++-------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 63d373b..695114b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,6 @@ # Build stage FROM node:22-alpine AS builder WORKDIR /app - -# Install dependencies for fabric.js -RUN apk add --no-cache python3 make g++ pixman cairo pango jpeg-dev - COPY package.json package-lock.json ./ RUN npm ci COPY . . diff --git a/src/components/Panel/TextPanel.jsx b/src/components/Panel/TextPanel.jsx index fc88a4f..615c2ac 100644 --- a/src/components/Panel/TextPanel.jsx +++ b/src/components/Panel/TextPanel.jsx @@ -1,4 +1,3 @@ -import { Button } from "../ui/Button"; import { X } from "lucide-react"; import { ScrollArea } from "../ui/scroll-area"; import { useContext, useEffect, useRef, useState } from "react"; @@ -8,6 +7,7 @@ import { fabric } from "fabric"; import CommonPanel from "./CommonPanel"; import useProject from "@/hooks/useProject"; import { useParams } from "react-router-dom"; +import { Button } from "../ui/button"; export default function TextPanel() { const { canvas, setSelectedPanel } = useContext(CanvasContext); @@ -20,7 +20,8 @@ export default function TextPanel() { function isUUID(value) { if (typeof value !== "string") return false; - const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; + const uuidRegex = + /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; return uuidRegex.test(value); } @@ -62,7 +63,7 @@ export default function TextPanel() { setActiveObject(text); canvas.renderAll(); - const object = canvas.toJSON(['id', 'selectable']); + const object = canvas.toJSON(["id", "selectable"]); const updateData = { ...projectData?.data, object }; // Wait for the project update before continuing projectUpdate({ id, updateData }); diff --git a/vite.config.js b/vite.config.js index 7ec4f22..2d03010 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,6 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react-swc' -import path from "path" +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react-swc"; +import path from "path"; // https://vite.dev/config/ export default defineConfig({ @@ -11,9 +11,6 @@ export default defineConfig({ }, }, server: { - port: 5175 + port: 5175, }, - esbuild: { - target: "esnext", - } -}) +});