10BC0 Fix improper import statement by sarimarton · Pull Request #891 · cyclejs/cyclejs · GitHub
[go: up one dir, main page]

Skip to content

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.

1 participant

0