From a3144150e0cbd11d283047fd0b8f9295b78286ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Tue, 13 Feb 2018 06:13:25 -0800 Subject: [PATCH] fix Yoga imports for build script Summary: The bundling of gatsby is done in node. This caused the node-libs from yoga being loaded. This directly imports the browser version. Reviewed By: emilsjolander Differential Revision: D6975779 fbshipit-source-id: 0257a86733c5552259b171309e59cc676786621e --- website/src/components/Playground/CodeComponentKit.js | 2 +- website/src/components/Playground/CodeJavaScript.js | 2 +- website/src/components/Playground/CodeLitho.js | 2 +- website/src/components/Playground/CodeReactNative.js | 2 +- website/src/components/Playground/LayoutRecord.js | 2 +- website/src/components/Playground/YogaEnumSelect.js | 2 +- website/src/components/Playground/YogaNode.js | 2 +- website/src/components/Playground/index.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/website/src/components/Playground/CodeComponentKit.js b/website/src/components/Playground/CodeComponentKit.js index c37239d6..66e1c0a2 100644 --- a/website/src/components/Playground/CodeComponentKit.js +++ b/website/src/components/Playground/CodeComponentKit.js @@ -1,5 +1,5 @@ // @flow -import yoga from 'yoga-layout'; +import yoga from 'yoga-layout/dist/entry-browser'; import LayoutRecord from './LayoutRecord'; import PositionRecord from './PositionRecord'; import type {LayoutRecordT} from './LayoutRecord'; diff --git a/website/src/components/Playground/CodeJavaScript.js b/website/src/components/Playground/CodeJavaScript.js index 7b7b3a26..4f049836 100644 --- a/website/src/components/Playground/CodeJavaScript.js +++ b/website/src/components/Playground/CodeJavaScript.js @@ -10,7 +10,7 @@ * @format */ -import yoga from 'yoga-layout'; +import yoga from 'yoga-layout/dist/entry-browser'; import LayoutRecord from './LayoutRecord'; import PositionRecord from './PositionRecord'; import type {LayoutRecordT} from './LayoutRecord'; diff --git a/website/src/components/Playground/CodeLitho.js b/website/src/components/Playground/CodeLitho.js index 251a8949..695a14d1 100644 --- a/website/src/components/Playground/CodeLitho.js +++ b/website/src/components/Playground/CodeLitho.js @@ -10,7 +10,7 @@ * @format */ -import yoga from 'yoga-layout'; +import yoga from 'yoga-layout/dist/entry-browser'; import LayoutRecord from './LayoutRecord'; import PositionRecord from './PositionRecord'; import {JSEnumLookup} from './CodeJavaScript'; diff --git a/website/src/components/Playground/CodeReactNative.js b/website/src/components/Playground/CodeReactNative.js index 832ef1d5..b96517c0 100644 --- a/website/src/components/Playground/CodeReactNative.js +++ b/website/src/components/Playground/CodeReactNative.js @@ -10,7 +10,7 @@ * @format */ -import yoga from 'yoga-layout'; +import yoga from 'yoga-layout/dist/entry-browser'; import LayoutRecord from './LayoutRecord'; import PositionRecord from './PositionRecord'; import {JSEnumLookup} from './CodeJavaScript'; diff --git a/website/src/components/Playground/LayoutRecord.js b/website/src/components/Playground/LayoutRecord.js index 83bc8643..14ee2f95 100644 --- a/website/src/components/Playground/LayoutRecord.js +++ b/website/src/components/Playground/LayoutRecord.js @@ -14,7 +14,7 @@ import {Record, List} from 'immutable'; import type {RecordOf} from 'immutable'; import PositionRecord from './PositionRecord'; import type {PositionRecordT} from './PositionRecord'; -import yoga from 'yoga-layout'; +import yoga from 'yoga-layout/dist/entry-browser'; import type { Yoga$Align, diff --git a/website/src/components/Playground/YogaEnumSelect.js b/website/src/components/Playground/YogaEnumSelect.js index 3da9e3e7..3208b5db 100644 --- a/website/src/components/Playground/YogaEnumSelect.js +++ b/website/src/components/Playground/YogaEnumSelect.js @@ -11,7 +11,7 @@ */ import React, {Component} from 'react'; -import yoga from 'yoga-layout'; +import yoga from 'yoga-layout/dist/entry-browser'; import {Radio, Menu, Dropdown, Button, Icon} from 'antd'; import './YogaEnumSelect.css'; const RadioButton = Radio.Button; diff --git a/website/src/components/Playground/YogaNode.js b/website/src/components/Playground/YogaNode.js index bca56089..9ec7b1c7 100644 --- a/website/src/components/Playground/YogaNode.js +++ b/website/src/components/Playground/YogaNode.js @@ -11,7 +11,7 @@ */ import React, {Component} from 'react'; -import yoga, {Node} from 'yoga-layout'; +import yoga, {Node} from 'yoga-layout/dist/entry-browser'; import PositionGuide from './PositionGuide'; import PositionRecord from './PositionRecord'; import type {LayoutRecordT} from './LayoutRecord'; diff --git a/website/src/components/Playground/index.js b/website/src/components/Playground/index.js index bae542c7..be069448 100644 --- a/website/src/components/Playground/index.js +++ b/website/src/components/Playground/index.js @@ -11,7 +11,7 @@ */ import React, {Component} from 'react'; -import yoga from 'yoga-layout'; +import yoga from 'yoga-layout/dist/entry-browser'; import YogaNode from './YogaNode'; import Editor from './Editor'; import {List, setIn} from 'immutable';