Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package.json #40

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open

Update package.json #40

wants to merge 1 commit into from

Conversation

danbopes
Copy link

@danbopes danbopes commented Nov 6, 2021

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 use require()), this does not integrate very well with any node.js project (In my specific case next.js), and causes an error SyntaxError: Cannot use import statement outside a module. Specifying the type explicitly (That this is a module) removes this error completely.

Because of the fact that you're using import, specifying the type as a module will allow it to be imported easily into node.js projects. Since this is not common.js (Doesn't use `require()`), this does not integrate very well with any node.js project (In my specific case next.js).
@danbopes
Copy link
Author

danbopes commented Nov 6, 2021

Please please please get this pushed to npm asap, so that I can build my project without some horrendous workarounds.

@Jared-Dev
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants