Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

replace all require(.svg) with esm import#7948

Merged
kerryarchibald merged 1 commit intodevelopfrom
fix/21271/svg-img-tags
Mar 2, 2022
Merged

replace all require(.svg) with esm import#7948
kerryarchibald merged 1 commit intodevelopfrom
fix/21271/svg-img-tags

Conversation

@kerryarchibald
Copy link
Copy Markdown
Contributor

@kerryarchibald kerryarchibald commented Mar 2, 2022

Fixes: element-hq/element-web#21271
Update all require imports of svgs to use ESM imports.
Ideally we wouldn't use these img tag icons any longer, but replacing them with react icon components would involve style changes and would be error prone in a batch as large as this.

Screenshot 2022-03-02 at 16 21 37

Screenshot 2022-03-02 at 16 18 12


This PR currently has no changelog labels, so will not be included in changelogs.

A reviewer can add one of: T-Deprecation, T-Enhancement, T-Defect, T-Task to indicate what type of change this is, or add Type: [enhancement/defect/task] to the description and I'll add them for you.

Preview: https://pr7948--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.

Signed-off-by: Kerry Archibald <kerrya@element.io>
@kerryarchibald kerryarchibald requested a review from a team as a code owner March 2, 2022 15:26
Copy link
Copy Markdown
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@kerryarchibald kerryarchibald merged commit 61cd463 into develop Mar 2, 2022
@kerryarchibald kerryarchibald deleted the fix/21271/svg-img-tags branch March 2, 2022 16:14
kerryarchibald pushed a commit that referenced this pull request Mar 3, 2022
kerryarchibald pushed a commit that referenced this pull request Mar 3, 2022
* Revert "replace all require(svgs) with esm import (#7948)"

This reverts commit 61cd463.

* add .default to svg icon inline requires

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add shameful eslint ignore

Signed-off-by: Kerry Archibald <kerrya@element.io>

* format eslintrc

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add missed MFileBody change

Signed-off-by: Kerry Archibald <kerrya@element.io>

* one more broken svg

Signed-off-by: Kerry Archibald <kerrya@element.io>

* and ignore it

Signed-off-by: Kerry Archibald <kerrya@element.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SVGs missing throughout the app

2 participants