Skip to content

SVG files are not rendering or working properly in React Native v0.80.1 #448

@Yeasirarafat53

Description

@Yeasirarafat53

SVG files are not rendering or working properly in React Native v0.80.1 when using the package react-native-svg-transformer version ^1.5.1.

📦 Package Versions
React Native: 0.80.1

react-native-svg-transformer: ^1.5.1

react-native-svg: ^15.11.2

⚙️ Current Configuration
metro.config.js:

const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts } = defaultConfig.resolver;

/**
 * Metro configuration
 * https://reactnative.dev/docs/metro
 *
 * @type {import('metro-config').MetroConfig}
 */
const config = {
  transformer: {
    babelTransformerPath: require.resolve(
      "react-native-svg-transformer/react-native"
    )
  },
  resolver: {
    assetExts: assetExts.filter((ext) => ext !== "svg"),
    sourceExts: [...sourceExts, "svg"]
  }
};

module.exports = mergeConfig(defaultConfig, config);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions