mixpanel / mixpanel-js

Official Mixpanel JavaScript Client Library
https://mixpanel.com/help/reference/javascript
Other
888 stars 312 forks source link

Cannot use import statement outside a module #435

Open Tar-Abg opened 3 months ago

Tar-Abg commented 3 months ago

image

image (3)

We use package version of 2.48.1 but after new release 2.54.0 the 2.48.1 version giving such a error

tdumitrescu commented 3 months ago

Can you give us some more information about how you're importing the library? Doing the default way: import mixpanel from 'mixpanel-browser'; should use this file: https://github.com/mixpanel/mixpanel-js/blob/master/dist/mixpanel.cjs.js which does not have any import statements in it.