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

Error when compiling in Angular 12 application - ./node_modules/graphql-playground-react/lib/assets/logo.png:1:0 - Error: Module parse failed: Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file) #1343

Open
MurrayFurtado opened this issue Aug 16, 2021 · 3 comments

Comments

@MurrayFurtado
Copy link

This issue pertains to the following package(s):

  • [x ] GraphQL Playground HTML

What OS and OS version are you experiencing the issue(s) on? Windows

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on? 1.7.27

What is the expected behavior? - Compile succeeds

What is the actual behavior? - Compile fails with error

./node_modules/graphql-playground-react/lib/assets/logo.png:1:0 - Error: Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

What steps may we take to reproduce the behavior? - Compile an angular 12 project with graphql-playground as a dependency.

Please provide a gif or image of the issue for a quicker response/fix.

@medbz
Copy link

medbz commented Dec 20, 2021

+1

@slimou
Copy link

slimou commented Jun 14, 2022

hello same issue @MurrayFurtado have you a solution ?

@ardatan ardatan closed this as completed Jun 14, 2022
@ardatan ardatan reopened this Jun 14, 2022
@artemave
Copy link

artemave commented Jun 29, 2022

This issue also makes it impossible to use graphql-playground-react with importmap

One way to fix it would be to compile import imageSource from '../assets/logo.png' (here) down to inline data.
Currently, in the npm package, it's compiled to var logo_png_1 = require("../assets/logo.png"); which leaves down to the user to inline the image. That works fine when user code goes through webpack/esbuild/etc., but jspm doesn't work that way. It doesn't allow any code transformations - it's simpy following imports.

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

5 participants