From b32a521ce4da23ed3a562e4e38b02ab6d6cef777 Mon Sep 17 00:00:00 2001 From: vitaliytv Date: Mon, 27 Jul 2026 10:43:14 +0300 Subject: [PATCH] =?UTF-8?q?fix(app):=20dev-=D1=81=D0=B5=D1=80=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=20Vite=20=D0=BD=D0=B5=20=D0=B1=D0=B0=D1=87=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20node=5Fmodules=20=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D1=80=D0=B5=D0=BF=D0=BE=20=D0=B7=20git-wo?= =?UTF-8?q?rktree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vite fs.allow за замовчуванням зупиняє workspace-root пошук на .git поточного дерева. У git worktree (де немає власного node_modules — усе резолвиться вгору в основний репозиторій) це блокує роздачу файлів шрифтів Quasar (material-symbols) — іконки в UI не рендерились, замість них показувався сирий текст. Явно додаємо корінь основного репо (git rev-parse --git-common-dir) до fs.allow. Co-Authored-By: Claude Sonnet 5 --- app/docs/vite.config.md | 3 +-- app/vite.config.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/docs/vite.config.md b/app/docs/vite.config.md index 2726b3c..d80a8c3 100644 --- a/app/docs/vite.config.md +++ b/app/docs/vite.config.md @@ -3,9 +3,8 @@ type: JS Module title: vite.config.js resource: app/vite.config.js docgen: - crc: 428dc103 + crc: 3e06ab05 model: omlx/gemma-4-e4b-it-OptiQ-4bit - tier: local-min score: 100 issues: judge:inaccurate:0.98 judgeModel: openai-codex/gpt-5.4-mini diff --git a/app/vite.config.js b/app/vite.config.js index e76ba9b..bcce9a7 100644 --- a/app/vite.config.js +++ b/app/vite.config.js @@ -1,14 +1,23 @@ // @ts-nocheck +import { execSync } from 'node:child_process' +import { dirname } from 'node:path' import { fileURLToPath } from 'node:url' import { quasar, transformAssetUrls } from '@quasar/vite-plugin' import Vue from '@vitejs/plugin-vue' import AutoImport from 'unplugin-auto-import/vite' -import { defineConfig } from 'vite' +import { defineConfig, searchForWorkspaceRoot } from 'vite' import Layouts from 'vite-plugin-vue-layouts-next' import VueMacros from 'vue-macros/vite' const host = process.env.TAURI_DEV_HOST const quasarVariables = fileURLToPath(new URL('src/quasar-variables.sass', import.meta.url)) +// git worktrees have their own .git, so Vite's workspace-root search stops there +// and never reaches the main repo's node_modules — allow it explicitly +const monorepoRoot = dirname( + execSync('git rev-parse --git-common-dir', { cwd: import.meta.dirname }) + .toString() + .trim() +) // https://vite.dev/config/ export default defineConfig(() => ({ @@ -41,6 +50,9 @@ export default defineConfig(() => ({ : undefined, watch: { ignored: ['**/src-tauri/**'] + }, + fs: { + allow: [searchForWorkspaceRoot(import.meta.dirname), monorepoRoot] } } }))