react-orbitjs
react-orbitjs copied to clipboard
Change global object for UMD
I was getting a failure mode of
$ jest
FAIL __tests__/App.test.android.tsx
● Test suite failed to run
ReferenceError: self is not defined
7 | import Orbit from "@orbit/core";
> 8 | import {DataProvider} from "react-orbitjs";
| ^
running jest tests in an Expo project.
Per the webpack docs,
When targeting a library, especially when libraryTarget is
umd
, this option indicates what global object will be used to mount the library. To make UMD build available on both browsers and Node.js, set output.globalObject option tothis