From 15774f1b0569374eb01ad064aab5e48b186bc486 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 3 Aug 2026 20:05:04 +0200 Subject: [PATCH] Fix weird Vite manifest import loop in glitch-soc (#3614) --- vite.config.mts | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/vite.config.mts b/vite.config.mts index ba78d6708c..5ef33e705c 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -212,20 +212,10 @@ async function findEntrypoints() { sw: path.resolve(jsRoot, 'mastodon/service_worker/sw.ts'), }; - // First, JS entrypoints - const jsEntrypointsDir = path.resolve(jsRoot, 'entrypoints'); - const jsEntrypoints = await readdir(jsEntrypointsDir, { - withFileTypes: true, - }); - const jsExtTest = /\.[jt]sx?$/; - for (const file of jsEntrypoints) { - if (file.isFile() && jsExtTest.test(file.name)) { - entrypoints[file.name.replace(jsExtTest, '')] = path.resolve( - jsEntrypointsDir, - file.name, - ); - } - } + // Upstream adds files from `app/javascript/entrypoints` in there. + // In glitch-soc, `GlitchThemes` is taking care of that, so remove the + // upstream code to prevent processing the same file twice, which results + // in weird import cycles in the manifest. // Next, SCSS entrypoints const scssEntrypointsDir = path.resolve(jsRoot, 'styles/entrypoints');