Can't import inside .mjs file
MumiaIrrequieta opened this issue ยท 3 comments
MumiaIrrequieta commented
"SyntaxError: Cannot use import statement outside a module".
Hi, I'm switching to ESM and I'm getting this error while trying to import this library and it's the only one blocking the switch.
I did rename the files in dist folder to .mjs and their references in package.json and got it to work, but it's far from being a good way to fix it.
Here is the stackblitz example of it: https://stackblitz.com/edit/node-xgku6b?file=index.mjs
Thank you for you attention.
Best regards,
Joรฃo Rodrigues
zheeeng commented
The stackblitz link was missed, can you provide it again?
zheeeng commented
Thx for your feedback! We just then shipped 1.7.0 to support your usage.
MumiaIrrequieta commented
Thank you very much for the swift fix. ๐