diff --git a/gatsby-browser.ts b/gatsby-browser.ts new file mode 100644 index 0000000..161cf99 --- /dev/null +++ b/gatsby-browser.ts @@ -0,0 +1,26 @@ +/** + * *** CONFIDENTIAL *** + * ------------------------------------------------------------------------- + * Unauthorized copying of this file, via any medium is strictly prohibited. + * ------------------------------------------------------------------------- + * + * @summary The following script defines actions to + * be loaded in the clients' browser. + * + * @author Alvis HT Tang + * @license Proprietary + * @copyright Copyright (c) 2018 - All Rights Reserved. + * ------------------------------------------------------------------------- + */ + +import 'babel-polyfill'; +import Browser from '#definitions/gatsby/browser'; + +/* + * onClientEntry is required for the polyfill to be loaded + * see https://github.com/gatsbyjs/gatsby/issues/2177 + */ +export const onClientEntry: Browser.onClientEntry = () => { + // Don't need to do anything here, but if you don't + // export something, the import won't work. +};