View my published open source packages:
NPM | Firefox Add-ons | Packagist | Wordpress.org
Polyfill requestAnimationFrame and cancelAnimationFrame
License: MIT License
View my published open source packages:
NPM | Firefox Add-ons | Packagist | Wordpress.org
rollup doesn't want to transpile 3rd party dependencies.
Seems the author of rollup doesn't like the idea of transpiling 3rd party dependencies -- which I tend to agree.
When I import animation-frame-polyfill
rollup transpiles the module syntax only.
If you don't mind would you make jsnext:main
point to a es5 transpiled version for this lib? Keeping the es6 module syntax of course.
I have a Gatsby app which won't build and fails here:
I am not familiar with animations and polyfills, please help me to get that through build.
This is my output where it fails:
success Building production JavaScript and CSS bundles - 54.226s
success Rewriting compilation hashes - 0.031s
failed Building static HTML for pages - 10.245s
ERROR #95312
"window" is not available during server side rendering.
See our docs page for more info on this error: https://gatsby.dev/debug-html
8 | var requestAnimationFrame = exports.requestAnimationFrame = function () {
9 |
> 10 | for (var i = 0, limit = prefix.length; i < limit && !window.requestAnimationFrame; ++i) {
| ^
11 | window.requestAnimationFrame = window[prefix[i] + 'RequestAnimationFrame'];
12 | }
13 |
WebpackError: ReferenceError: window is not defined
- animation-frame-polyfill.cjs.js:10
node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.cjs.js:10:41
- animation-frame-polyfill.cjs.js:33
node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.cjs.js:33:2
- facts.jsx:1
src/components/facts/facts.jsx:1:1
- home.js:1
src/pages/home.js:1:1
- sync-requires.js:14
_this_is_virtual_fs_path_/$virtual/sync-requires.js:14:54
many, thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.