Replace require calls for image uris with imports (#33847)

* Replace `require` calls for image uris with imports

In prep for vitest

* Fix copyright
This commit is contained in:
Michael Telatynski
2026-06-15 17:09:51 +01:00
committed by GitHub
parent 2f4e6a4ec4
commit 86a89c2aa5
8 changed files with 43 additions and 30 deletions
@@ -6,13 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
// We're importing via require specifically so the svg becomes a URI rather than a DOM element.
// eslint-disable-next-line @typescript-eslint/no-require-imports
const matrixSvg = require("../../../res/img/matrix.svg").default;
import MatrixSvg from "../../../res/img/matrix.svg";
/**
* Intended to replace $matrixLogo in the welcome page.
*/
export const MATRIX_LOGO_HTML = `<a href="https://matrix.org" target="_blank" rel="noreferrer noopener">
<img class="mx_WelcomePage_logo" width="79" height="34" alt="Matrix" style="padding-left: 1px;vertical-align: middle" src="${matrixSvg}"/>
<img class="mx_WelcomePage_logo" width="79" height="34" alt="Matrix" style="padding-left: 1px;vertical-align: middle" src="${MatrixSvg}"/>
</a>`;