Use babel-plugin-transform-runtime instead of babel-polyfill

babel-plugin-transform-runtime allows to reduce size of the
resulting bundle dramatically (from 260kb to 24kb).

Change-Id: I3cceb1caddfb5b0b2048b7d4efc2cebfee26ab91
This commit is contained in:
Vitaly Kramskikh 2016-09-05 19:05:28 +03:00
parent 3cacbffd74
commit e33758f9db
3 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,4 @@
{ {
"presets": ["es2015"] "presets": ["es2015"],
"plugins": ["transform-runtime"]
} }

View File

@ -29,7 +29,7 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"homepage": "http://www.openstack.org/", "homepage": "http://www.openstack.org/",
"dependencies": { "dependencies": {
"babel-polyfill": "^6.9.1", "babel-runtime": "^6.11.6",
"isomorphic-fetch": "^2.2.1", "isomorphic-fetch": "^2.2.1",
"loglevel": "^1.4.1" "loglevel": "^1.4.1"
}, },
@ -38,6 +38,7 @@
"babel-core": "^6.10.4", "babel-core": "^6.10.4",
"babel-loader": "^6.2.4", "babel-loader": "^6.2.4",
"babel-plugin-transform-inline-environment-variables": "^6.8.0", "babel-plugin-transform-inline-environment-variables": "^6.8.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.9.0", "babel-preset-es2015": "^6.9.0",
"babel-register": "^6.9.0", "babel-register": "^6.9.0",
"eslint": "^3.0.0", "eslint": "^3.0.0",

View File

@ -1,4 +1,3 @@
import 'babel-polyfill';
import 'isomorphic-fetch'; import 'isomorphic-fetch';
export default class Test { export default class Test {