remind101 / jest-transform-graphql

Make .graphql file importing work in Jest
MIT License
122 stars 25 forks source link

Syntax Error #14

Open RehanShakir opened 2 years ago

RehanShakir commented 2 years ago

I am receiving this error after adding transform: { '\\.(gql|graphql)$': 'jest-transform-graphql', 'l to jest config file

The error I am receiving `SyntaxError: /Users/user/Desktop/newproj/fe-eventme/node_modules/react-native-ratings/dist/images/star.png: Unexpected character '�'. (1:0)

> 1 | �PNG
    | ^
  2 | 
  3 | 
  4 | IHDR2?��sRGB���YiTXtXML:com.adobe.xmp<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">

`

comp615 commented 2 years ago

This problem does not seem related to jest-transform-graphql. More likely it's an issue with your specific setup or code as the transformer would not be loading a png file. Possible you have an invalid gql file, or something is otherwise wrong with your transformer setup