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:
- Scaffold an expo-router project using a template:
npx create-expo-app@latest --template tabs@49
- Install
react-native-ui-lib
:npm i react-native-ui-lib
- Replace any component with a ui lib component:
// import { View } from 'react-native'; // comment this out
import { View } from 'react-native-ui-lib';
- Bundle for web:
npx expo start --web
- 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](https://private-user-images.githubusercontent.com/59832188/279502170-84de0c6d-e238-4c8f-86ec-d322b2ac0aa7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDkzMDY0NzUsIm5iZiI6MTcwOTMwNjE3NSwicGF0aCI6Ii81OTgzMjE4OC8yNzk1MDIxNzAtODRkZTBjNmQtZTIzOC00YzhmLTg2ZWMtZDMyMmIyYWMwYWE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzAxVDE1MTYxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU0NmMzNjNlYjY0Mzg1NTNkN2U3ZGU3NDJiMmI2ODhiMDUzZDliOWFkNTg4NjFiMzU0YTJkZmM2NzNiN2EwYzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PRa2d6qRJPf0YPpr7gQlwhaTjV9RlIYQVctH03l_MwU)
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 ?
Cc: @M-i-k-e-l
Hi @brianangulo,
Thanks for the feedback