1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Make sure polyfill is loaded first by using import statement

ES6 `import` statements hoist their imports to the top of the file.
Using `require(‘babel/polyfill’)` actually loads the polyfill after the
other imports, causing errors.
This commit is contained in:
Brett Sun 2015-12-15 16:26:40 +01:00
parent 1b4c6938f6
commit 274f149272

View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
require('babel/polyfill'); import polyfill from 'babel/polyfill';
import React from 'react'; import React from 'react';
import { Router, Redirect } from 'react-router'; import { Router, Redirect } from 'react-router';