We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c66c296 commit fe4dc74Copy full SHA for fe4dc74
packages/react-scripts/config/polyfills.js
@@ -22,3 +22,9 @@ require('whatwg-fetch');
22
// Object.assign() is commonly used with React.
23
// It will use the native implementation if it's present and isn't buggy.
24
Object.assign = require('object-assign');
25
+
26
+// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
27
+// We don't polyfill it in the browser--this is user's responsibility.
28
+if (process.env.NODE_ENV === 'test') {
29
+ require('raf').polyfill(global);
30
+}
packages/react-scripts/package.json
@@ -48,6 +48,7 @@
48
"postcss-flexbugs-fixes": "3.2.0",
49
"postcss-loader": "2.0.6",
50
"promise": "8.0.1",
51
+ "raf": "3.4.0",
52
"react-dev-utils": "^4.1.0",
53
"style-loader": "0.19.0",
54
"sw-precache-webpack-plugin": "0.11.4",
0 commit comments