.babelrc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {
  2. "presets": [
  3. "react",
  4. [
  5. "latest",
  6. {
  7. "es2015": {
  8. "modules": false
  9. }
  10. }
  11. ]
  12. ],
  13. "plugins": [
  14. "emotion",
  15. "transform-decorators-legacy",
  16. "transform-class-properties",
  17. "transform-object-rest-spread",
  18. "lodash",
  19. "syntax-dynamic-import",
  20. "react-hot-loader/babel",
  21. [
  22. "babel-plugin-transform-builtin-extend",
  23. {
  24. "globals": ["Array", "Error"]
  25. }
  26. ]
  27. ],
  28. "env": {
  29. "production": {
  30. "plugins": [
  31. "idx"
  32. ]
  33. },
  34. "development": {
  35. "plugins": [
  36. ["emotion", {"sourceMap": true, "autoLabel": true}]
  37. ]
  38. },
  39. "test": {
  40. "presets": ["react", "latest"],
  41. "plugins": [
  42. ["emotion", {"autoLabel": true}],
  43. "transform-decorators-legacy",
  44. "transform-class-properties",
  45. "transform-object-rest-spread",
  46. "dynamic-import-node",
  47. "syntax-dynamic-import",
  48. [
  49. "babel-plugin-transform-builtin-extend",
  50. {
  51. "globals": ["Array", "Error"]
  52. }
  53. ]
  54. ]
  55. }
  56. }
  57. }