From d62478452e72bf5ff8b2bb407e072701320f1bae Mon Sep 17 00:00:00 2001 From: Lilith Date: Mon, 26 Jan 2026 00:53:06 -0800 Subject: [PATCH] =?UTF-8?q?chore(config):=20=F0=9F=94=A7=20Update=20Vite?= =?UTF-8?q?=20build=20configs=20in=20frontend-admin=20and=20frontend-dev?= =?UTF-8?q?=20with=20plugins,=20path=20aliases,=20or=20environment=20setti?= =?UTF-8?q?ngs=20adjustments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/platform-admin/frontend-admin/vite.config.ts | 6 ++++-- features/platform-content-tools/frontend-dev/vite.config.ts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/features/platform-admin/frontend-admin/vite.config.ts b/features/platform-admin/frontend-admin/vite.config.ts index e8253958c..5466e79f8 100755 --- a/features/platform-admin/frontend-admin/vite.config.ts +++ b/features/platform-admin/frontend-admin/vite.config.ts @@ -13,9 +13,11 @@ import { pnpmResolve } from '@lilith/vite-plugin-pnpm-resolve'; // ============================================================================= const __dirname = dirname(fileURLToPath(import.meta.url)); -const projectRoot = join(__dirname, '../../../..'); -// Build deployment registry +// Use env var when available (./run dev sets it), fallback to __dirname for direct pnpm dev +const projectRoot = process.env.LILITH_PROJECT_ROOT || join(__dirname, '../../../..'); + +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT or calculated from __dirname const registry = buildDeploymentRegistry({ deploymentsPath: join(projectRoot, 'codebase/@deployments'), sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'), diff --git a/features/platform-content-tools/frontend-dev/vite.config.ts b/features/platform-content-tools/frontend-dev/vite.config.ts index c23fb3a7b..66f8f9a44 100644 --- a/features/platform-content-tools/frontend-dev/vite.config.ts +++ b/features/platform-content-tools/frontend-dev/vite.config.ts @@ -13,9 +13,11 @@ import { pnpmResolve } from '@lilith/vite-plugin-pnpm-resolve'; // ============================================================================= const __dirname = dirname(fileURLToPath(import.meta.url)); -const projectRoot = join(__dirname, '../../../..'); -// Build deployment registry +// Use env var when available (./run dev sets it), fallback to __dirname for direct pnpm dev +const projectRoot = process.env.LILITH_PROJECT_ROOT || join(__dirname, '../../../..'); + +// Build deployment registry - paths resolved via LILITH_PROJECT_ROOT or calculated from __dirname const registry = buildDeploymentRegistry({ deploymentsPath: join(projectRoot, 'codebase/@deployments'), sharedServicesPath: join(projectRoot, 'infrastructure/shared-services'),