Remove transform-runtime

We use instance methods (or at least, draft.js does) so we need
babel-polyfill instead.
pull/2480/head
David Baker 2016-10-13 10:57:10 +01:00
parent 18450058d7
commit 82de2ca4ec
3 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,3 @@
{
"presets": ["react", "es2015", "es2016", "es2017", "stage-2"],
"plugins": ["transform-runtime"]
"presets": ["react", "es2015", "es2016", "es2017", "stage-2"]
}

View File

@ -36,6 +36,7 @@
"test:multi": "karma start"
},
"dependencies": {
"babel-polyfill": "^6.5.0",
"babel-runtime": "^6.11.6",
"browser-request": "^0.3.3",
"classnames": "^2.1.2",
@ -66,6 +67,7 @@
"babel-eslint": "^6.1.0",
"babel-loader": "^6.2.5",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-polyfill": "^6.5.0",
"babel-preset-es2015": "^6.16.0",
"babel-preset-es2016": "^6.16.0",
"babel-preset-es2017": "^6.16.0",

View File

@ -16,6 +16,15 @@ limitations under the License.
'use strict';
// for ES6 stuff like startsWith() that Safari doesn't handle
// and babel doesn't do by default
// Note we use this, not the babel transform-runtime plugin
// since transform-runtime does not cover instance methods
// such as "foobar".includes("foo") which bits of our library
// code use.
// https://babeljs.io/docs/plugins/transform-runtime/
require('babel-polyfill');
// CSS requires: just putting them here for now as CSS is going to be
// refactored soon anyway
require('../../vector/components.css');