Skip to content

Commit 5842d44

Browse files
alyonsalexander.n.lyons@gmail.com
authored andcommitted
fix: change build target
Use a more compatible build set to be usable across more browsers. - Install babel-preset-env - Install transform-object-assign - Change to use env in .babelrc
1 parent 73d4c97 commit 5842d44

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.babelrc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
{
2-
"presets": ["es2015", "stage-0", "react"]
2+
"presets": [
3+
["env", {
4+
"targets": {
5+
"browsers": [
6+
"> 1%",
7+
"last 4 versions"
8+
]
9+
},
10+
"debug": false
11+
}],
12+
"react",
13+
"stage-1"
14+
],
15+
16+
"plugins": ["transform-object-assign"]
317
}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
"devDependencies": {
4848
"babel-cli": "^6.14.0",
4949
"babel-loader": "^6.2.2",
50+
"babel-plugin-transform-object-assign": "^6.22.0",
51+
"babel-preset-env": "^1.6.1",
5052
"babel-preset-es2015": "^6.14.0",
5153
"babel-preset-react": "^6.11.1",
5254
"babel-preset-react-app": "^0.2.1",

yarn.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,12 @@ babel-plugin-transform-function-bind@^6.22.0:
906906
babel-plugin-syntax-function-bind "^6.8.0"
907907
babel-runtime "^6.22.0"
908908

909+
babel-plugin-transform-object-assign@^6.22.0:
910+
version "6.22.0"
911+
resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz#f99d2f66f1a0b0d498e346c5359684740caa20ba"
912+
dependencies:
913+
babel-runtime "^6.22.0"
914+
909915
babel-plugin-transform-object-rest-spread@6.26.0, babel-plugin-transform-object-rest-spread@^6.22.0:
910916
version "6.26.0"
911917
resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06"
@@ -1021,7 +1027,7 @@ babel-polyfill@^6.26.0:
10211027
core-js "^2.5.0"
10221028
regenerator-runtime "^0.10.5"
10231029

1024-
babel-preset-env@1.6.1:
1030+
babel-preset-env@1.6.1, babel-preset-env@^1.6.1:
10251031
version "1.6.1"
10261032
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48"
10271033
dependencies:

0 commit comments

Comments
 (0)