Open danbopes opened 2 years ago
Please please please get this pushed to npm asap, so that I can build my project without some horrendous workarounds.
@danbopes while frustrating that this change is not in place almost a year down the road you should be able to fix this by using Next's dynamic import syntax to turn off SSR.
Because of the fact that you're using
import ... from ...
syntax (not commonjs), specifying the type as a module will allow it to be imported into node.js projects. Since this is not common.js (Doesn't userequire()
), this does not integrate very well with any node.js project (In my specific case next.js), and causes an errorSyntaxError: Cannot use import statement outside a module
. Specifying the type explicitly (That this is a module) removes this error completely.