Closed MinhNgoc-HRI closed 1 year ago
Hello, by a Reproduction Repo I meant a new GitHub repository with a codebase in which you can reliably reproduce the problem. I need that to look into the problem you're reporting here.
Hello, by a Reproduction Repo I meant a new GitHub repository with a codebase in which you can reliably reproduce the problem. I need that to look into the problem you're reporting here.
Hi @RafikiTiki , this is my repo: https://github.com/ngnm1009/superApp When I run the mini app project, it works fine, but when I run it with the host app , I facing an error
Thanks for the repro repo, I will investigate it.
Hey @ngnm1009,
I investigated this issue a little bit and it seems that unless we explicitly import react-native-svg
in host app, it will be dropped from the bundle, therefore JS part of it won't be available in runtime.
For now, to resolve your issue please add the following import in host app's App.tsx
:
import 'react-native-svg'
I will need to dig deeper and investigate whether there is a nicer solution for it
Hey @ngnm1009,
I investigated this issue a little bit and it seems that unless we explicitly import
react-native-svg
in host app, it will be dropped from the bundle, therefore JS part of it won't be available in runtime.For now, to resolve your issue please add the following import in host app's
App.tsx
:import 'react-native-svg'
I will need to dig deeper and investigate whether there is a nicer solution for it
Hi @jbroma , thank for your answer. it work
I am still facing the same issue
It's still the same for a newly generated nx/expo mobile app.
Environment
Description
There is an error when using react-native-svg
Error:
mini app webpack.config.mjs :
SVG component:
Reproducible Demo