diff --git a/vite.castle.config.ts b/vite.castle.config.ts index 272009c..d8d2797 100644 --- a/vite.castle.config.ts +++ b/vite.castle.config.ts @@ -105,10 +105,13 @@ export default defineConfig(({ mode }) => ({ ], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)), - // CRITICAL: Remap @/app.config to the castle app's config - // ExpensesAPI and other modules import from @/app.config directly + // ORDER MATTERS — @rollup/plugin-alias is first-match-wins. + // The more specific @/app.config remap must precede the @ prefix + // alias, otherwise '@/app.config' matches '@' first and resolves + // to ./src/app.config (the hub config). ExpensesAPI etc. import + // from @/app.config and need the per-app config. '@/app.config': fileURLToPath(new URL('./src/accounting-app/app.config.ts', import.meta.url)), + '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, build: { diff --git a/vite.chat.config.ts b/vite.chat.config.ts index d49a067..c5b00ac 100644 --- a/vite.chat.config.ts +++ b/vite.chat.config.ts @@ -98,8 +98,9 @@ export default defineConfig(({ mode }) => ({ ], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)), + // ORDER MATTERS — @/app.config must precede @ (first-match-wins). '@/app.config': fileURLToPath(new URL('./src/chat-app/app.config.ts', import.meta.url)), + '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, build: { diff --git a/vite.forum.config.ts b/vite.forum.config.ts index fca9d11..feeea35 100644 --- a/vite.forum.config.ts +++ b/vite.forum.config.ts @@ -98,8 +98,9 @@ export default defineConfig(({ mode }) => ({ ], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)), + // ORDER MATTERS — @/app.config must precede @ (first-match-wins). '@/app.config': fileURLToPath(new URL('./src/forum-app/app.config.ts', import.meta.url)), + '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, build: { diff --git a/vite.market.config.ts b/vite.market.config.ts index c8e5f8d..5a1a5fe 100644 --- a/vite.market.config.ts +++ b/vite.market.config.ts @@ -98,8 +98,9 @@ export default defineConfig(({ mode }) => ({ ], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)), + // ORDER MATTERS — @/app.config must precede @ (first-match-wins). '@/app.config': fileURLToPath(new URL('./src/market-app/app.config.ts', import.meta.url)), + '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, build: { diff --git a/vite.tasks.config.ts b/vite.tasks.config.ts index 6fa6cd2..c939772 100644 --- a/vite.tasks.config.ts +++ b/vite.tasks.config.ts @@ -98,8 +98,9 @@ export default defineConfig(({ mode }) => ({ ], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)), + // ORDER MATTERS — @/app.config must precede @ (first-match-wins). '@/app.config': fileURLToPath(new URL('./src/tasks-app/app.config.ts', import.meta.url)), + '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, build: { diff --git a/vite.wallet.config.ts b/vite.wallet.config.ts index 153e4b9..31b2a1d 100644 --- a/vite.wallet.config.ts +++ b/vite.wallet.config.ts @@ -104,8 +104,9 @@ export default defineConfig(({ mode }) => ({ ], resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)), + // ORDER MATTERS — @/app.config must precede @ (first-match-wins). '@/app.config': fileURLToPath(new URL('./src/wallet-app/app.config.ts', import.meta.url)), + '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, build: {