From b99aeda16a2e8ca672d0d01dfe3637da18862f94 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Wed, 24 Jun 2026 17:47:01 +0200 Subject: [PATCH] fixes missing font file in monaco-editor (#322735) --- build/lib/standalone.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/lib/standalone.ts b/build/lib/standalone.ts index 967ff0108bf..a51fee788a4 100644 --- a/build/lib/standalone.ts +++ b/build/lib/standalone.ts @@ -139,9 +139,9 @@ function transportCSS(module: string, enqueue: (module: string) => void, write: function _rewriteOrInlineUrls(contents: string, forceBase64: boolean): string { return _replaceURL(contents, (url) => { - const fontMatch = url.match(/^(.*).ttf\?(.*)$/); + const fontMatch = url.match(/^(.*)\.ttf(\?.*)?$/); if (fontMatch) { - const relativeFontPath = `${fontMatch[1]}.ttf`; // trim the query parameter + const relativeFontPath = `${fontMatch[1]}.ttf`; // trim the optional query parameter const fontPath = path.join(path.dirname(module), relativeFontPath); enqueue(fontPath); return relativeFontPath;