Skip to content

Commit 0881d0a

Browse files
committed
add babel polyfill, use babelrc
1 parent b127c20 commit 0881d0a

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"babel-loader": "^6.4.1",
5050
"babel-plugin-module-resolver": "^2.5.0",
5151
"babel-plugin-transform-runtime": "^6.23.0",
52+
"babel-polyfill": "^6.23.0",
5253
"babel-preset-env": "^1.2.2",
5354
"babel-preset-es2015": "^6.24.0",
5455
"babel-preset-react": "^6.23.0",

webpack/base.js

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ const base = extend => {
99
exclude: /node_modules/,
1010
use: [{
1111
loader: 'babel-loader',
12-
options: {
13-
presets: ['env', 'es2015', 'react', 'stage-2'],
14-
},
1512
}],
1613
},
1714
];

webpack/client.js

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const clientConfig = base({
1818
client: [
1919
`webpack-hot-middleware/client?path=${'http://localhost'}:${process.env.DEV_SERVER_PORT}/__webpack_hmr`,
2020
'react-hot-loader/patch',
21+
'babel-polyfill',
2122
'./src/client/client.js',
2223
],
2324
},

yarn.lock

+8
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,14 @@ babel-plugin-transform-strict-mode@^6.22.0:
809809
babel-runtime "^6.22.0"
810810
babel-types "^6.22.0"
811811

812+
babel-polyfill:
813+
version "6.23.0"
814+
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
815+
dependencies:
816+
babel-runtime "^6.22.0"
817+
core-js "^2.4.0"
818+
regenerator-runtime "^0.10.0"
819+
812820
babel-preset-env@^1.2.2:
813821
version "1.2.2"
814822
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.2.2.tgz#1dbc4d7f8a575691d301f45fa9b2f9698b1e3b92"

0 commit comments

Comments
 (0)