FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.63k stars 861 forks source link

Use ESM import for thumbnail_placeholder.svg instead of require #6174

Closed absidue closed 4 days ago

absidue commented 6 days ago

Use ESM import for thumbnail_placeholder.svg instead of require

Pull Request Type

Description

Using require for it means that webpack simulates the commonjs import at runtime, however switching to static ESM imports means that it just becomes a normal const variable that is referenced in 4 places.

Testing

In the general settings set the thumbnail preference to hidden and check that the thumbnail placeholder still shows up.

Desktop