Use babel-runtime as opposed to babel-polyfill (#5662)

* Add babel-runtime

* Add babel-transform-runtime plugin

* Remove babel-polyfill imports

* Remove babel-polyfill package

* Transform exports to work around webpack 2.2
This commit is contained in:
Jaco Greeff 2017-05-19 16:51:15 +02:00 committed by Gav Wood
parent 2fd44e6ce4
commit e7abd3510a
9 changed files with 4 additions and 11 deletions

View File

@ -7,6 +7,8 @@
"transform-decorators-legacy", "transform-decorators-legacy",
"transform-class-properties", "transform-class-properties",
"transform-object-rest-spread", "transform-object-rest-spread",
"transform-es2015-modules-commonjs",
"transform-runtime",
"lodash", "lodash",
"recharts" "recharts"
], ],
@ -25,7 +27,6 @@
}, },
"test": { "test": {
"plugins": [ "plugins": [
"transform-runtime",
[ "babel-plugin-webpack-alias", { "config": "webpack/test.js" } ] [ "babel-plugin-webpack-alias", { "config": "webpack/test.js" } ]
] ]
} }

View File

@ -77,11 +77,11 @@
"babel-plugin-recharts": "1.1.0", "babel-plugin-recharts": "1.1.0",
"babel-plugin-transform-class-properties": "6.23.0", "babel-plugin-transform-class-properties": "6.23.0",
"babel-plugin-transform-decorators-legacy": "1.3.4", "babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-es2015-modules-commonjs": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.23.0", "babel-plugin-transform-object-rest-spread": "6.23.0",
"babel-plugin-transform-react-remove-prop-types": "0.3.2", "babel-plugin-transform-react-remove-prop-types": "0.3.2",
"babel-plugin-transform-runtime": "6.23.0", "babel-plugin-transform-runtime": "6.23.0",
"babel-plugin-webpack-alias": "2.1.2", "babel-plugin-webpack-alias": "2.1.2",
"babel-polyfill": "6.23.0",
"babel-preset-env": "1.1.9", "babel-preset-env": "1.1.9",
"babel-preset-es2015": "6.22.0", "babel-preset-es2015": "6.22.0",
"babel-preset-es2016": "6.22.0", "babel-preset-es2016": "6.22.0",
@ -159,6 +159,7 @@
}, },
"dependencies": { "dependencies": {
"@parity/wordlist": "1.0.1", "@parity/wordlist": "1.0.1",
"babel-runtime": "6.23.0",
"base32.js": "0.1.0", "base32.js": "0.1.0",
"bignumber.js": "3.0.1", "bignumber.js": "3.0.1",
"blockies": "0.0.2", "blockies": "0.0.2",

View File

@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // along with Parity. If not, see <http://www.gnu.org/licenses/>.
import 'babel-polyfill';
import 'whatwg-fetch'; import 'whatwg-fetch';
import es6Promise from 'es6-promise'; import es6Promise from 'es6-promise';

View File

@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // along with Parity. If not, see <http://www.gnu.org/licenses/>.
import 'babel-polyfill';
import 'whatwg-fetch'; import 'whatwg-fetch';
import es6Promise from 'es6-promise'; import es6Promise from 'es6-promise';

View File

@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // along with Parity. If not, see <http://www.gnu.org/licenses/>.
import 'babel-polyfill/dist/polyfill.js';
import es6Promise from 'es6-promise'; import es6Promise from 'es6-promise';
es6Promise.polyfill(); es6Promise.polyfill();

View File

@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // along with Parity. If not, see <http://www.gnu.org/licenses/>.
import 'babel-polyfill/dist/polyfill.js';
import es6Promise from 'es6-promise'; import es6Promise from 'es6-promise';
es6Promise.polyfill(); es6Promise.polyfill();

View File

@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // along with Parity. If not, see <http://www.gnu.org/licenses/>.
import 'babel-polyfill';
import 'whatwg-fetch'; import 'whatwg-fetch';
import es6Promise from 'es6-promise'; import es6Promise from 'es6-promise';

View File

@ -53,9 +53,6 @@ module.exports = {
'node-fetch': 'node-fetch' 'node-fetch': 'node-fetch'
}, },
module: { module: {
noParse: [
/babel-polyfill/
],
rules: [ rules: [
{ {
test: /(\.jsx|\.js)$/, test: /(\.jsx|\.js)$/,

View File

@ -23,7 +23,6 @@ const ENV = process.env.NODE_ENV || 'development';
const DEST = process.env.BUILD_DEST || '.build'; const DEST = process.env.BUILD_DEST || '.build';
let modules = [ let modules = [
'babel-polyfill',
'bignumber.js', 'bignumber.js',
'blockies', 'blockies',
'brace', 'brace',