Monorepo assets

SDK Version: 45, IOS (maybe android too)

I have a typescript yarn 3 monorepo and workspace package that creates custom icons. It needs to access a MyIcon.json and MyIcon.ttf.

package/MyIconWorkspace

  • asset/fonts
    • MyIcons.json
    • MyIcons.ttf
  • src
    • index.tsx

my code looks like:

import { createIconSet } from '@expo/vector-icons'
import glyphMap from '../assets/fonts/MyIcons.json'

export default createIconSet(glyphMap, 'MyIcons', 'MyIcons.ttf')

My tsconfig.json for the package looks like:

{
    "extends": "@hybrid-app/tsconfig/tsconfig.shared.json",
    "compilerOptions": {
        "resolveJsonModule": true,
        "esModuleInterop": true
    }
    
}

the error I’m getting is:
[Unhandled promise rejection: Error: Unable to download file: Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSErrorFailingURLStringKey= MyIcons.ttf.ttf, NSErrorFailingURLKey= MyIcons.ttf.ttf, _NSURLErrorRelatedURLSessionTaskErrorKey=(]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.