.babelrc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {
  2. "presets": [
  3. "react",
  4. [
  5. "env",
  6. {
  7. "exclude": ["transform-async-to-generator", "transform-regenerator"],
  8. "loose": true,
  9. "modules": false,
  10. "targets": {
  11. "browsers": ["last 2 versions", "IE >= 11", "iOS >= 9"]
  12. }
  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. "react-intl",
  23. {
  24. "messagesDir": "./build/messages"
  25. }
  26. ],
  27. "preval"
  28. ],
  29. "env": {
  30. "development": {
  31. "plugins": [
  32. "transform-react-jsx-source",
  33. "transform-react-jsx-self"
  34. ]
  35. },
  36. "production": {
  37. "plugins": [
  38. "lodash",
  39. [
  40. "transform-react-remove-prop-types",
  41. {
  42. "mode": "remove",
  43. "removeImport": true,
  44. "additionalLibraries": [
  45. "react-immutable-proptypes"
  46. ]
  47. }
  48. ],
  49. "transform-react-inline-elements",
  50. [
  51. "transform-runtime",
  52. {
  53. "helpers": true,
  54. "polyfill": false,
  55. "regenerator": false
  56. }
  57. ]
  58. ]
  59. },
  60. "test": {
  61. "plugins": [
  62. "transform-es2015-modules-commonjs"
  63. ]
  64. }
  65. }
  66. }