webpack / react-starter

[OUTDATED] Starter template for React with webpack. Doesn't focus on simplicity! NOT FOR BEGINNERS!
2.21k stars 320 forks source link

Parse doesn't work on webpack client side in production build #73

Closed jeffyuans closed 9 years ago

jeffyuans commented 9 years ago

var xhr = new Parse.XMLHttpRequest(); ^ TypeError: undefined is not a function

I had the above error when I tried to use parse in my webpack project. The project works fine in dev build. I doubt it is because the npm parse library should be used on the server side instead of the front end. Googling suggests calling might be the key to solve this but I don't think I can do this in webpack? Is there way I can change the backend server of my webpack project to invoke calls related to parse? i.e my front end will communicate back the data to the backend to invoke the calls that are related to parse.

Thanks.