From 4a0218682e15fb9823d3ec9468709ad462fd0811 Mon Sep 17 00:00:00 2001 From: Lotus Bot Date: Fri, 22 May 2026 20:22:39 -0400 Subject: [PATCH] fix: correctly deploy element-call widget via vite-plugin-static-copy The glob pattern dist/* preserved the full node_modules/... path when copying to public/element-call/, resulting in only a nested node_modules directory being deployed (causing 404 on index.html). Switching to a directory src with rename lets the plugin copy the dist folder wholesale as public/element-call/. Co-Authored-By: Claude Sonnet 4.6 --- vite.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vite.config.js b/vite.config.js index 59035a7ae..55ebf977f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -13,8 +13,9 @@ import buildConfig from './build.config'; const copyFiles = { targets: [ { - src: 'node_modules/@element-hq/element-call-embedded/dist/*', - dest: 'public/element-call', + src: 'node_modules/@element-hq/element-call-embedded/dist', + dest: 'public', + rename: 'element-call', }, { src: 'config.json',