marker-io / browser-sdk

Marker.io browser SDK
MIT License
8 stars 8 forks source link

Provide CommonJS module export #11

Closed kevin51jiang closed 2 years ago

kevin51jiang commented 2 years ago

Currently it breaks with NextJS.

Since NextJS is prerendered serverside, and it uses Nodejs which uses commonjs exports instead, the export default breaks it (expects module.exports = foo)

To fix this, maybe it could be compiled into separate files or into UMD (Universal module definition) by something like rollup

olivierkaisin commented 2 years ago

Hi @kevin51jiang, good point here. We'll integrate these changes in an upcoming release. Thanks for suggesting!