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 improper import statement #891

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

Fix improper import statement #891

wants to merge 1 commit into from

Conversation

sarimarton
Copy link

'raf' and 'performance-now' modules export functions, and 'import *' produces a namespace object, which is always a plain object. This error is hidden in cjs compile targets, because require() calls return with the exact module.exports instance. But in ES6 targets, compilers throw an error saying that 'requestAnimationFrame is not a function'

  • There exists an issue discussing the need for this PR
  • I added new tests for the issue I fixed or built
  • I used pnpm run commit instead of git commit

'raf' and 'performance-now' modules export functions, and 'import *' produces a namespace object, which is always a plain object. This error is hidden in cjs compile targets, because require() calls return with the exact module.exports instance. But in ES6 targets, compilers throw an error saying that 'requestAnimationFrame is not a function'
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

1 participant