Closed Makdash49 closed 7 years ago
As much as I know you have to use a secret key to query Amazon which you can't use client side (as it will be completely public). As of your specific error you just need to add json-loader to your webpack conf.
@Makdash49 how did you solve this? I was thinking about doing the same, but I think it's not possible because of cross-origin (CORS) policy.
(as it will be completely public).
I don't understand what you mean by completely public? You can you environment variables to hide the keys, how is that any different than using it server side? Thank you
How can I solve this then? If I am rendering server side, than I can create an API which calls Amazons API on the backend. Then use my API on the front end of my React App?Is that the correct way? Thank you!
I would like to incorporate the amazon-product-api into a React app I have created. Is that possible? I'm getting a lot of errors when I run webpack.
See below. Thanks!