Skip to content

Commit 17e4cfb

Browse files
NE-SmallTownnecolas
authored andcommitted
[fix] Convert Animated vendor files to ES modules
Close #1846
1 parent abd4cc7 commit 17e4cfb

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

packages/react-native-web/src/vendor/react-native/Animated/bezier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function newtonRaphsonIterate(aX, _aGuessT, mX1, mX2) {
7979
return aGuessT;
8080
}
8181

82-
module.exports = function bezier(
82+
export default function bezier(
8383
mX1: number,
8484
mY1: number,
8585
mX2: number,

packages/react-native-web/src/vendor/react-native/Animated/polyfills/InteractionManager.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
'use strict';
99

10-
module.exports = {
11-
createInteractionHandle: function() {},
12-
clearInteractionHandle: function() {}
10+
const InteractionManager = {
11+
createInteractionHandle() {},
12+
clearInteractionHandle() {}
1313
};
14+
15+
export default InteractionManager;

packages/react-native-web/src/vendor/react-native/Animated/polyfills/Set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ SetPolyfill.prototype.forEach = function(cb) {
2121
this._cache.forEach(cb);
2222
};
2323

24-
module.exports = SetPolyfill;
24+
export default SetPolyfill;

packages/react-native-web/src/vendor/react-native/Animated/polyfills/flattenStyle.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7+
78
'use strict';
8-
module.exports = function(style) {
9+
10+
export default function flattenStyle(style) {
911
return style;
1012
};

0 commit comments

Comments
 (0)