.babelrc 1.2 KB

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