wix / react-native-ui-lib

UI Components Library for React Native

Home Page:https://wix.github.io/react-native-ui-lib/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic fonts added on v7.9.0+ causes bundling for Expo Web with Metro and react-native-web to break

brianangulo opened this issue · comments

Description

After v7.9.0 and when not using Dynamic Fonts at all when building a react native app for web using Expo, Metro, and react-native-web I encounter a bundling error where the bundler is unable to resolve PermissonsAndroid. Please refer to the screenshot found in the sections below. Downgrading to v7.8.0 resolves the issue.

Related to

  • Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

Easiest way to repro:

  1. Scaffold an expo-router project using a template: npx create-expo-app@latest --template tabs@49
  2. Install react-native-ui-lib: npm i react-native-ui-lib
  3. Replace any component with a ui lib component:
// import { View } from 'react-native'; // comment this out
import { View } from 'react-native-ui-lib';
  1. Bundle for web: npx expo start --web
  2. See error

Expected behavior

It should bundle for web without any issues in projects where Dynamic fonts are not being used

Actual behavior

Fails to bundle for web

More Info

Code snippet

// import { View } from 'react-native'; // comment this out
import { View } from 'react-native-ui-lib';

Screenshots/Video

Screenshot 2023-10-31 at 1 35 17 PM

Environment

v7.9.0+ failures 🔴
v7.8.0 works ✅

  • react-native-web: ~v0.19.6
  • React Native version: v0.72.6
  • React Native UI Lib version: v7.9.1

Affected platforms

  • Android
  • iOS
  • Web

Possibly related to: #2736 ?

Hi @brianangulo,
Thanks for the feedback