We use `export default` begrudgingly here. Ideally we'd use just `export`, though this entire SDK expects things to be exported as a default. Instead of breaking everything, we'll sacrifice our export pattern for a smaller diff - a later commit can always do the default export -> regular export conversion.
This ensures we check for a falsy name in `getInitialLetter` instead of throwing
errors. We should perhaps also fix whatever other issues have led to the input
being undefined in the first place, but for now we leave this for another day.
Hopefully helps with https://github.com/vector-im/riot-web/issues/10983
This allows Webpack to insert the proper image URL after builds steps like
adding a hash and so on. The path you supply to `require` is relative to the JS
source file, just like any other would be.