-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong svgr config file resolution #379
Comments
Thanks @aspirisen ! Having the svg images inside the same folder as the React Native app itself is expected by default since it should work for most of the people using this library. Do you have some example of your folder structure that you could share, or perhaps even a some kind of demo app that could demonstrate the problem? All my own apps just contain the app code inside the same folder, so I haven't been thinking too much about how the library could work in a monorepo or a similar setup. |
@kristerkari Here is rough workspaces example P.S. I faced realy strange issue when 2024-09-11.22.29.30.mov |
@aspirisen thanks for the example! I can have a look. |
According to this line
const config = await resolveConfig(resolveConfigDir(filename));
https://github.com/kristerkari/react-native-svg-transformer/blob/master/index.js#L50
The svgr config will be searched starting from the svg file. If the svg file folder is not a child of current app folder the svgr config will be ignored.
In this case if you have
.svgrrc.js
file next tometro.config.js
file the svgr config file will not be found.The text was updated successfully, but these errors were encountered: