diff --git a/.babelrc b/.babelrc index c13c5f6..3ca1979 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,4 @@ { - "presets": ["es2015"] + "presets": ["es2015"], + "plugins": ["transform-runtime"] } diff --git a/gulpfile.js b/gulpfile.js index ef6c0bd..d49efbb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -116,6 +116,7 @@ gulp.task('scripts', 'Build scripts into ./build directory', function() { return browserify(config.browserify) .transform(canopy) .transform(babelify) + .add(require.resolve('babel-polyfill')) .add('./src/js/main.js') .bundle() .on('error', notify.onError()) diff --git a/package.json b/package.json index 1888b29..9d6ca0f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,10 @@ "license": "MIT", "private": true, "devDependencies": { + "babel-plugin-transform-runtime": "^6.1.2", + "babel-polyfill": "^6.0.16", "babel-preset-es2015": "^6.0.14", + "babel-runtime": "^6.0.14", "babelify": "^7.1.0", "browserify": "^12.0.1", "canopy": "^0.2.0",