Skip to content
Permalink
Browse files

Expose react as global (#1501)

  • Loading branch information...
danielhusar authored and gaearon committed Jan 2, 2019
1 parent dbcc9c2 commit 8127896a946a6b5844ad20946189ecb2a9fac1fd
Showing with 7 additions and 0 deletions.
  1. +7 −0 gatsby-browser.js
@@ -6,12 +6,19 @@

'use strict';

const React = require('react');
const ReactDOM = require('react-dom');

// Import global styles
require('normalize.css');
require('./src/css/reset.css');
require('./src/prism-styles');
require('./src/css/algolia.css');

// Expose React and ReactDOM as globals for console playground
window.React = React;
window.ReactDOM = ReactDOM;

// A stub function is needed because gatsby won't load this file otherwise
// (https://github.com/gatsbyjs/gatsby/issues/6759)
exports.onClientEntry = () => {};

0 comments on commit 8127896

Please sign in to comment.
You can’t perform that action at this time.