Closed Tvrqvoise closed 6 years ago
This won't work, metro bundler will prefer the react-native
source in package.json
over the transpiled lib
. It would include source code in the native app without proper babel configuration. It might still work since the RN preset includes all required babel plugins and presets to use/transpile the source code, however any other consumer of this module would run into issues. By just using @babel/preset-env
this might be fixed. Since later versions of RN include that preset.
https://github.com/godaddy/svgs/pull/29/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R38 updated the babel dependencies
Going to close this as a solution that is not suitable for all use cases.
This solves the same issue as #26 except instead of adding the dependencies, it does not package the babel config so that the missing presets never get required.