From 155728b136f00c9c1a8e69284578c8e7e7b59659 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 10 Feb 2016 14:54:49 +0000 Subject: [PATCH] make babel actually do full ES6 emulation for Safari 8 --- package.json | 1 + src/vector/index.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/package.json b/package.json index 42aa567e..8b1ea710 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "prepublish": "npm run build:css && npm run build:compile" }, "dependencies": { + "babel-polyfill": "^6.5.0", "classnames": "^2.1.2", "extract-text-webpack-plugin": "^0.9.1", "filesize": "^3.1.2", diff --git a/src/vector/index.js b/src/vector/index.js index 0d2b19ee..0b239557 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -16,6 +16,10 @@ limitations under the License. 'use strict'; +// for ES6 stuff like startsWith() that Safari doesn't handle +// and babel doesn't do by default +require('babel-polyfill'); + // CSS requires: just putting them here for now as CSS is going to be // refactored soon anyway require('../../vector/components.css');