Skip to content
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

Paints all svg blue #234

Open
VictorPulzz opened this issue Dec 21, 2022 · 0 comments
Open

Paints all svg blue #234

VictorPulzz opened this issue Dec 21, 2022 · 0 comments

Comments

@VictorPulzz
Copy link

VictorPulzz commented Dec 21, 2022

If svg has more than two colors and I do not specify color, then my svg is painted blue -_-

Render:
image

How should it look:
image

metro.config.js

const { getDefaultConfig } = require('metro-config');
const { resolver: defaultResolver } = getDefaultConfig.getDefaultValues();

module.exports = {
  transformer: {
    babelTransformerPath: require.resolve('react-native-svg-transformer'),
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: true,
      },
    }),
  },
  resolver: {
    ...defaultResolver,
    assetExts: defaultResolver.assetExts.filter(ext => ext !== 'svg'),
    sourceExts: [...defaultResolver.sourceExts, 'cjs', 'svg'],
  },
};

env

"react-native": "0.70.6",
"react-native-svg": "~13.4.0",
"react-native-svg-transformer": "^1.0.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant