dashhive / crowdnode.js

CrowdNode SDK for Node.js
https://github.com/dashhive/crowdnode.js
MIT License
5 stars 3 forks source link

Fix/vite build require error #43

Closed jojobyte closed 2 years ago

jojobyte commented 2 years ago

This line dashhive/crowdnode.js/blob/main/lib/crowdnode.js#L521 if (require.main === module) { causes an issue with building the vite app into a static site, didnt seem to affect the dev mode, but the dist version gets a Uncaught ReferenceError: require is not defined error when loading in the browser.

Removing this block as a potential fix. Per side convo, might want to be added to a test. This is not creating the test. 😇