-
Notifications
You must be signed in to change notification settings - Fork 0
/
process.js
30 lines (28 loc) · 1.07 KB
/
process.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* The examples provided by Oculus are for non-commercial testing and
* evaluation purposes only.
*
* Oculus reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* OCULUS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
// Hack for react-dom to work, otherwise the console spits out
// a `process is not defined error`, in what looks like react's initialization:
// if (process.env.NODE_ENV === 'production') {
// module.exports = require('./cjs/react.production.min.js');
// } else {
// module.exports = require('./cjs/react.development.js');
// }
window.process = {
env: {
NODE_ENV: 'production',
},
};
if (__DEV__) {
window.process.env.NODE_ENV = 'development';
}