.babelrc 1.32 KB
Newer Older
1
{
2 3 4 5 6
  "presets": [
    "react",
    [
      "env",
      {
7
        "exclude": ["transform-async-to-generator", "transform-regenerator"],
8
        "loose": true,
9
        "modules": false,
10 11 12
        "targets": {
          "browsers": ["last 2 versions", "IE >= 11", "iOS >= 9"]
        }
13 14 15
      }
    ]
  ],
16
  "plugins": [
17
    "syntax-dynamic-import",
18
    ["transform-object-rest-spread", { "useBuiltIns": true }],
19
    "transform-decorators-legacy",
20
    "transform-class-properties",
21 22 23 24 25
    [
      "react-intl",
      {
        "messagesDir": "./build/messages"
      }
26 27
    ],
    "preval"
28 29 30 31 32 33 34 35 36 37
  ],
  "env": {
    "development": {
      "plugins": [
        "transform-react-jsx-source",
        "transform-react-jsx-self"
      ]
    },
    "production": {
      "plugins": [
38
        "lodash",
39 40 41 42 43 44 45 46 47 48
        [
          "transform-react-remove-prop-types",
          {
            "mode": "remove",
            "removeImport": true,
            "additionalLibraries": [
              "react-immutable-proptypes"
            ]
          }
        ],
49
        "transform-react-inline-elements",
50 51 52 53 54 55 56 57
        [
          "transform-runtime",
          {
            "helpers": true,
            "polyfill": false,
            "regenerator": false
          }
        ]
58
      ]
59 60 61 62 63
    },
    "test": {
      "plugins": [
        "transform-es2015-modules-commonjs"
      ]
64 65
    }
  }
66
}