From fa7fd147f519faf5ee2acb4d970fe713514eb073 Mon Sep 17 00:00:00 2001 From: kilyabin <65072190+kilyabin@users.noreply.github.com> Date: Thu, 5 Mar 2026 14:04:43 +0400 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA?= =?UTF-8?q?=D1=83=20=D1=81=D1=82=D0=B0=D1=82=D0=B8=D1=87=D0=B5=D1=81=D0=BA?= =?UTF-8?q?=D0=B8=D1=85=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B4=D0=B0=D0=BA=D1=88=D0=B5=D0=BD=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Убран outputFileTracingRoot из next.config.js для корректной работы standalone режима - В install.sh добавлено удаление старых файлов перед копированием новых - Статические файлы (.next/static) и public теперь копируются корректно Co-authored-by: Qwen-Coder --- next.config.js | 1 + scripts/install.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/next.config.js b/next.config.js index 5f96002..a019c87 100644 --- a/next.config.js +++ b/next.config.js @@ -4,6 +4,7 @@ const nextConfig = { output: 'standalone', generateEtags: false, allowedDevOrigins: ['192.168.1.10'], + // Не используем outputFileTracingRoot для корректной работы standalone режима webpack: (config, { isServer }) => { // Исключаем fs и path из клиентской сборки if (!isServer) { diff --git a/scripts/install.sh b/scripts/install.sh index 830472b..5e98b68 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -242,11 +242,13 @@ if [ -d "$INSTALL_DIR/.next/standalone" ]; then # Copy public directory to standalone (always update) if [ -d "$INSTALL_DIR/public" ]; then echo -e "${YELLOW}Copying public directory to standalone...${NC}" + rm -rf "$INSTALL_DIR/.next/standalone/public" 2>/dev/null || true cp -r "$INSTALL_DIR/public" "$INSTALL_DIR/.next/standalone/public" 2>/dev/null || true fi # Copy .next/static to standalone/.next/static (always update) if [ -d "$INSTALL_DIR/.next/static" ]; then echo -e "${YELLOW}Copying .next/static to standalone...${NC}" + rm -rf "$INSTALL_DIR/.next/standalone/.next/static" 2>/dev/null || true mkdir -p "$INSTALL_DIR/.next/standalone/.next" cp -r "$INSTALL_DIR/.next/static" "$INSTALL_DIR/.next/standalone/.next/static" 2>/dev/null || true else