merkle-open / gondel

🚡 Gondel is a tiny library to bootstrap frontend components
https://gondel.js.org
MIT License
36 stars 10 forks source link

GondelReactComponent expects JSON script tags with wrong MIME type #80

Open dhardtke opened 3 years ago

dhardtke commented 3 years ago

According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types (and various other sources) the MIME type for json is application/json yet https://github.com/merkle-open/gondel/blob/5cf2151859c1572f0bdb545b813f8505028bd5b3/packages/plugins/react/src/GondelReactComponent.tsx#L116 expects text/json.

When we changed the MIME type in our project the JSON was no longer found. I propose we change the lookup to preferably look for application/json.