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

Fix package.json #888

Merged
merged 2 commits into from
Jan 3, 2023
Merged

Conversation

itsikcircle
Copy link
Contributor

A fix for

react-tooltip.cjs.min.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@itsikcircle
Copy link
Contributor Author

@danielbarion it should fix it.

@danielbarion
Copy link
Member

Thanks, guys, I'll run some checks locally and do a release today with this PR

@itsikcircle
Copy link
Contributor Author

Thanks, guys, I'll run some checks locally and do a release today with this PR

Thank you!

@danielbarion
Copy link
Member

This change is breaking the build, I'll take a look and I hope to finish soon
image

@itsikcircle
Copy link
Contributor Author

itsikcircle commented Jan 3, 2023

This change is breaking the build, I'll take a look and I hope to finish soon image

It's in the cli.js file, it's using ES6 import but it's not supported without type: module in the package.json
A simple solution is to use require instead of import, but then eslint will complain.

I've updated the PR with eslint-disable as this is a blocker for us and we can't downgrade to v4.

I can help looking into a better solution without eslint-disable later on.
I'm not sure why cli.js is required as rollup can create the folder and have config per environment.

@danielbarion
Copy link
Member

I tested locally and it's working on a next.js project as expected, thanks for the PR!

@danielbarion danielbarion merged commit e314c09 into ReactTooltip:master Jan 3, 2023
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

5 participants