demchenkoalex / react-native-module-template

A starter for the React Native library written in TypeScript, with linked example project and optional native code in Swift and Kotlin.
MIT License
216 stars 36 forks source link

How to add custom fonts #39

Open yuliantosb opened 2 years ago

yuliantosb commented 2 years ago

Hello, I want to ask how to add custom fonts, I already create react-native.config.js and add this line

module.exports = {
  project: {
    ios: {},
    android: {},
  },
  assets: ['./src/assets/fonts/'],
}

but when I run npx react-native link I got error

error Linking assets failed.
TypeError: Cannot read properties of null (reading 'files')

Is there any solution for this? Thanks in advance