.babelrc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {
  2. "env": {
  3. "production": {
  4. "presets": [
  5. [
  6. "env",
  7. {
  8. "debug": false,
  9. "useBuiltIns": true,
  10. "loose": true,
  11. "targets": {
  12. "browsers": ["last 5 versions", "ie>=11"]
  13. }
  14. }
  15. ],
  16. "react",
  17. "stage-1"
  18. ],
  19. "only": ["src"],
  20. "plugins": [
  21. [
  22. "transform-runtime",
  23. {
  24. "polyfill": false
  25. }
  26. ],
  27. [
  28. "import",
  29. {
  30. "libraryName": "antd",
  31. "libraryDirectory": "es",
  32. "style": true
  33. }
  34. ],
  35. "transform-decorators-legacy",
  36. "transform-react-jsx-source",
  37. "babel-plugin-styled-components",
  38. "transform-react-remove-prop-types",
  39. "transform-react-constant-elements",
  40. "transform-react-inline-elements"
  41. ]
  42. },
  43. "development": {
  44. "retainLines": true,
  45. "presets": [
  46. [
  47. "env",
  48. {
  49. "debug": false,
  50. "useBuiltIns": true,
  51. "targets": {
  52. "browsers": ["last 5 versions", "ie>=11"]
  53. }
  54. }
  55. ],
  56. "react",
  57. "stage-1"
  58. ],
  59. "plugins": [
  60. "react-hot-loader/babel",
  61. [
  62. "transform-runtime",
  63. {
  64. "polyfill": false
  65. }
  66. ],
  67. "transform-decorators-legacy",
  68. "transform-react-jsx-source",
  69. "transform-react-display-name",
  70. [
  71. "babel-plugin-styled-components",
  72. {
  73. "displayName": true,
  74. "minify": true
  75. }
  76. ],
  77. [
  78. "import",
  79. {
  80. "libraryName": "antd",
  81. "libraryDirectory": "es",
  82. "style": true
  83. }
  84. ]
  85. ]
  86. }
  87. }
  88. }