Change babel presets

Tune the compiled output to reduce file size.
This commit is contained in:
Nicolas Gallagher
2017-12-30 21:00:20 -08:00
parent 6f10f6be9c
commit 46e77d0b00
9 changed files with 49 additions and 94 deletions
+28 -2
View File
@@ -1,8 +1,34 @@
{
"presets": [
"react-native"
[
"babel-preset-env",
{
"loose": true,
"exclude": ["transform-es2015-typeof-symbol"],
"targets": {
"browsers": [
"chrome 38",
"android 4",
"firefox 40",
"ios_saf 7",
"safari 7",
"ie 10",
"ie_mob 11",
"edge 12",
"opera 16",
"op_mini 12",
"and_uc 9",
"and_chr 38"
]
}
}
],
"babel-preset-react",
"babel-preset-flow"
],
"plugins": [
[ "transform-react-remove-prop-types", { "mode": "wrap" } ]
["babel-plugin-transform-class-properties", { "loose": true }],
["babel-plugin-transform-object-rest-spread", { "useBuiltIns": true }],
["babel-plugin-transform-react-remove-prop-types", { "mode": "wrap" } ]
]
}