From cea798c57b4a46d7819cfc417278c764b2486a45 Mon Sep 17 00:00:00 2001 From: Peter van der Zee Date: Thu, 5 Apr 2018 06:14:52 -0700 Subject: [PATCH] Downgrade ES6 import to ES5 compat module.exports Reviewed By: rubennorte Differential Revision: D7498658 fbshipit-source-id: 6825c3010ce13c56f05284448ad9961fe058d7ea --- Libraries/Network/fetch.js | 2 +- Libraries/StyleSheet/StyleSheetTypes.js | 2 +- bots/dangerfile.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/Network/fetch.js b/Libraries/Network/fetch.js index 5a0de646c9..1e1c934316 100644 --- a/Libraries/Network/fetch.js +++ b/Libraries/Network/fetch.js @@ -12,7 +12,7 @@ 'use strict'; -import whatwg from 'whatwg-fetch'; +const whatwg = require('whatwg-fetch'); if (whatwg && whatwg.fetch) { module.exports = whatwg; diff --git a/Libraries/StyleSheet/StyleSheetTypes.js b/Libraries/StyleSheet/StyleSheetTypes.js index 6ff412ce8a..1e359e8b51 100644 --- a/Libraries/StyleSheet/StyleSheetTypes.js +++ b/Libraries/StyleSheet/StyleSheetTypes.js @@ -11,7 +11,7 @@ 'use strict'; -import AnimatedNode from 'AnimatedNode'; +const AnimatedNode = require('AnimatedNode'); export opaque type ____StyleSheetInternalStyleIdentifier_Internal: number = number; diff --git a/bots/dangerfile.js b/bots/dangerfile.js index b97ecaf8e1..3380e718fb 100644 --- a/bots/dangerfile.js +++ b/bots/dangerfile.js @@ -11,7 +11,7 @@ const fs = require('fs'); const includes = require('lodash.includes'); const minimatch = require('minimatch'); -import { danger, fail, markdown, message, warn } from 'danger'; +const { danger, fail, markdown, message, warn } = require('danger'); // Fails if the description is too short. if (!danger.github.pr.body || danger.github.pr.body.length < 10) {