You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to metro.config.js file the svgr config file will not be found.
The text was updated successfully, but these errors were encountered:
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
I would expect that packages/app/svgr.config.js will be taken as svgr configuration (like babel.config.js)
If you rename __svgr.config.js to svgr.config.js you will see logs in console react-native-svg.zip
P.S. I faced realy strange issue when svgr.config.js is stuck somewhere in cache, it loads only once. I was able to invalidate cache by renaming the project folder
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: