From 32c3376d84fc523094cb477084a0da99fbf29ad5 Mon Sep 17 00:00:00 2001 From: Echo Date: Thu, 18 Dec 2025 18:41:21 +0100 Subject: [PATCH] Fixes CDN domain loading (#37310) --- vite.config.mts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vite.config.mts b/vite.config.mts index 3250e8f78..30946d0c2 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -154,6 +154,14 @@ export const config: UserConfigFnPromise = async ({ mode, command }) => { }, }, }, + experimental: { + /** + * Setting this causes Vite to not rely on the base config for import URLs, + * and instead uses import.meta.url, which is what we want for proper CDN support. + * @see https://github.com/mastodon/mastodon/pull/37310 + */ + renderBuiltUrl: () => undefined, + }, worker: { format: 'es', },