Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat: update build configurations, enhance caching, and optimize chunking for improved performance

nirholas9c7ba0da7704
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 4d814beb2..d121f568f 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -31,12 +31,22 @@ jobs:
- uses: actions/setup-node@v4
with:
- node-version: 22
+ node-version: 24
cache: npm
+ - name: Cache chat node_modules
+ uses: actions/cache@v4
+ with:
+ path: chat/node_modules
+ key: chat-deps-${{ hashFiles('chat/package-lock.json') }}
+ restore-keys: chat-deps-
+
- name: Install dependencies
run: npm ci
+ - name: Install chat dependencies
+ run: cd chat && node scripts/ensure-deps.mjs
+
- name: Build
run: npm run build:all
diff --git a/chat/vite.config.js b/chat/vite.config.js
index e70aab2b7..b5895579f 100644
--- a/chat/vite.config.js
+++ b/chat/vite.config.js
@@ -1,6 +1,5 @@
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
-import viteCompression from 'vite-plugin-compression';
import path from 'path';
import fs from 'fs';
@@ -63,9 +62,6 @@ export default defineConfig(function () {
plugins: [
serveDevAssets(),
svelte(),
- viteCompression({
- filter: /^(?!.*pdf\.worker\.min-[A-Z0-9]+\.mjs$).*\.(js|mjs|json|css|html)$/i,
- }),
],
resolve: {
dedupe: ['three'],
diff --git a/package.json b/package.json
index 439e52535..4f1e125df 100644
--- a/package.json
+++ b/package.json
@@ -49,7 +49,7 @@
"build:rider": "mkdir -p dist/rider && cp rider/index.html dist/rider/ && cp -r rider/assets dist/rider/ && cp -r rider/build dist/rider/ && cp -r rider/vendor dist/rider/",
"build:rider:full": "cd rider && npm ci --prefer-offline --no-audit --no-fund --ignore-engines && npm run build && cd .. && npm run build:rider",
"build:fast": "npm run build",
- "build:all": "(npm run build:chat & npm run build & npm run build:lib & npm run build:rider & wait) && npm run publish:lib",
+ "build:all": "npm run build:chat && (npm run build & npm run build:lib & npm run build:rider & wait) && npm run publish:lib",
"clean": "rm -rf dist/* dist-lib/* || true",
"generate-icons": "node scripts/generate-pwa-icons.mjs",
"fetch-animations": "node scripts/download-animations.mjs",
diff --git a/public/chat/index.html b/public/chat/index.html
index c362f1873..a85d4b492 100644
--- a/public/chat/index.html
+++ b/public/chat/index.html
@@ -43,7 +43,7 @@
}
}
</script>
- <script type="module" crossorigin src="/chat/assets/index-CzrivwK3.js"></script>
+ <script type="module" crossorigin src="/chat/assets/index-DRIaITPE.js"></script>
<link rel="stylesheet" crossorigin href="/chat/assets/index-BvlQ9GOR.css">
</head>
<body>
diff --git a/vite.config.js b/vite.config.js
index 0255a15a7..775d908fd 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -38,6 +38,12 @@ const appConfig = {
build: {
chunkSizeWarningLimit: 1000,
rollupOptions: {
+ output: {
+ manualChunks(id) {
+ if (id.includes('node_modules/three/')) return 'three';
+ if (id.includes('node_modules/ethers/')) return 'ethers';
+ },
+ },
input: {
main: resolve(__dirname, 'index.html'),
app: resolve(__dirname, 'app.html'),