Skip to content

Commit 4e34a7f

Browse files
authored
Upgrade Babel 7 (#151)
* upgrade babel 7 * remove node 4 support * update dependencies
1 parent faef383 commit 4e34a7f

8 files changed

Lines changed: 2499 additions & 1576 deletions

File tree

.babelrc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"presets": [
3-
["es2015", {
4-
"loose": true,
5-
}],
6-
"react",
3+
[
4+
"@babel/preset-env",
5+
{
6+
"loose": true
7+
}
8+
],
9+
"@babel/preset-react"
710
],
811
"plugins": [
9-
"transform-class-properties",
10-
"transform-object-assign",
11-
],
12+
"@babel/plugin-proposal-class-properties",
13+
"@babel/plugin-transform-object-assign"
14+
]
1215
}

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
node_js:
3-
- '4'
43
- '6'
54
- '8'
65
- '10'

__tests__/.babelrc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"presets": [
3-
["es2015", {
4-
"loose": true,
5-
}],
6-
"react",
3+
[
4+
"@babel/preset-env",
5+
{
6+
"loose": true
7+
}
8+
],
9+
"@babel/preset-react"
710
],
811
"plugins": [
9-
"transform-async-to-generator",
10-
],
12+
"@babel/plugin-transform-async-to-generator"
13+
]
1114
}

example/.babelrc

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
{
22
"presets": [
3-
"es2015",
4-
"react",
3+
"@babel/preset-env",
4+
"@babel/preset-react"
55
],
66
"plugins": [
77
"dynamic-import-node",
8-
"transform-class-properties",
8+
"@babel/plugin-proposal-class-properties",
99
"../babel",
10-
["module-resolver", {
11-
"alias": {
12-
"react-loadable": "./src/index.js",
13-
"react-loadable/server": "./src/server.js",
14-
"react-loadable/webpack": "./src/webpack.js",
15-
},
16-
}]
17-
],
10+
[
11+
"module-resolver",
12+
{
13+
"alias": {
14+
"react-loadable": "./src/index.js",
15+
"react-loadable-webpack": "./src/webpack.js"
16+
}
17+
}
18+
]
19+
]
1820
}

example/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path';
33
import React from 'react';
44
import ReactDOMServer from 'react-dom/server';
55
import Loadable from 'react-loadable';
6-
import { getBundles } from 'react-loadable/webpack'
6+
import { getBundles } from 'react-loadable-webpack'
77
import App from './components/App';
88

99
const stats = require('./dist/react-loadable.json');

package.json

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,29 @@
1818
"prepare": "yarn build"
1919
},
2020
"dependencies": {
21-
"prop-types": "^15.5.0"
21+
"prop-types": "^15.6.2"
2222
},
2323
"devDependencies": {
24-
"babel-cli": "^6.24.1",
25-
"babel-loader": "^7.1.2",
26-
"babel-plugin-dynamic-import-node": "^1.1.0",
27-
"babel-plugin-module-resolver": "^2.7.1",
28-
"babel-plugin-transform-async-to-generator": "^6.24.1",
29-
"babel-plugin-transform-class-properties": "^6.24.1",
30-
"babel-plugin-transform-object-assign": "^6.22.0",
31-
"babel-preset-es2015": "^6.24.1",
32-
"babel-preset-react": "^6.24.1",
33-
"express": "^4.16.1",
34-
"flow-bin": "^0.41.0",
35-
"jest": "^21.2.1",
36-
"react": "^16.0.0",
37-
"react-dom": "^16.0.0",
38-
"react-test-renderer": "^16.0.0",
39-
"webpack": "^3.6.0"
24+
"@babel/cli": "^7.1.2",
25+
"@babel/core": "^7.1.2",
26+
"@babel/node": "^7.0.0",
27+
"@babel/plugin-proposal-class-properties": "^7.1.0",
28+
"@babel/plugin-transform-async-to-generator": "^7.1.0",
29+
"@babel/plugin-transform-object-assign": "^7.0.0",
30+
"@babel/preset-env": "^7.1.0",
31+
"@babel/preset-react": "^7.0.0",
32+
"babel-core": "^7.0.0-bridge.0",
33+
"babel-jest": "^23.6.0",
34+
"babel-loader": "^8.0.4",
35+
"babel-plugin-dynamic-import-node": "^2.2.0",
36+
"babel-plugin-module-resolver": "^3.1.1",
37+
"express": "^4.16.4",
38+
"flow-bin": "^0.83.0",
39+
"jest": "^23.6.0",
40+
"react": "^16.5.2",
41+
"react-dom": "^16.5.2",
42+
"react-test-renderer": "^16.5.2",
43+
"webpack": "^4.20.2"
4044
},
4145
"peerDependencies": {
4246
"react": "*"

webpack.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ module.exports = {
2121
options: {
2222
babelrc: false,
2323
presets: [
24-
['es2015', { modules: false }],
25-
'react',
24+
['@babel/preset-env', { modules: false }],
25+
'@babel/preset-react',
2626
],
2727
plugins: [
2828
'syntax-dynamic-import',
29-
'transform-class-properties',
30-
'transform-object-assign',
29+
'@babel/plugin-proposal-class-properties',
30+
'@babel/plugin-transform-object-assign',
3131
require.resolve('./babel'),
3232
],
3333
}

0 commit comments

Comments
 (0)