Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: deduplicate Three.js module resolution (#7066)

[._.]/ Adam Eivydcc76473911d
diff --git a/client/vite.config.js b/client/vite.config.js
index 8223261e35..156487621b 100644
--- a/client/vite.config.js
+++ b/client/vite.config.js
@@ -15,6 +15,7 @@ import {
const ANALYZE_BUNDLE = process.env.ANALYZE === 'true';
const CONFIG_DIR = import.meta.dirname;
+const THREE_MODULE_PATH = resolve(CONFIG_DIR, 'node_modules/three');
const rootPkg = JSON.parse(readFileSync(resolve(CONFIG_DIR, '../package.json'), 'utf-8'));
@@ -158,6 +159,11 @@ export default defineConfig(({ command, mode }) => {
template: 'treemap',
}),
].filter(Boolean),
+ resolve: {
+ alias: {
+ three: THREE_MODULE_PATH,
+ },
+ },
// Recharts is imported by lazy-loaded pages. Its published ESM files use
// bare es-toolkit/compat/* imports, so prebundle it before a lazy tab can
// expose those specifiers directly to the browser.
diff --git a/client/vitest.config.js b/client/vitest.config.js
index 3a71f8207e..eee8f4a613 100644
--- a/client/vitest.config.js
+++ b/client/vitest.config.js
@@ -1,10 +1,18 @@
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
+import { resolve } from 'path';
import { vitestCiPool } from '../scripts/vitestCiPool.js';
+const CONFIG_DIR = import.meta.dirname;
+
export default defineConfig({
plugins: [react()],
+ resolve: {
+ alias: {
+ three: resolve(CONFIG_DIR, 'node_modules/three'),
+ },
+ },
test: {
// Four DOM workers exhausted Testing Library's existing 3s async budget
// on the public runner before ChiefOfStaff's config panel settled. Keep the