.babelrc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {
  2. "presets": [
  3. [
  4. "@babel/preset-env",
  5. {
  6. "targets": {
  7. "browsers": [
  8. "> 1%",
  9. "last 2 versions",
  10. "ie >= 8"
  11. ]
  12. }
  13. }
  14. ]
  15. ],
  16. "plugins": [
  17. "transform-vue-jsx",
  18. [
  19. "@babel/plugin-transform-runtime",
  20. {
  21. "corejs": false,
  22. "helpers": false,
  23. "regenerator": true
  24. }
  25. ],
  26. [
  27. "import",
  28. {
  29. "libraryName": "vant",
  30. "libraryDirectory": "es",
  31. "style": true
  32. },
  33. "vant"
  34. ],
  35. "@babel/plugin-syntax-dynamic-import",
  36. "@babel/plugin-syntax-import-meta",
  37. "@babel/plugin-proposal-class-properties",
  38. "@babel/plugin-proposal-json-strings",
  39. [
  40. "@babel/plugin-proposal-decorators",
  41. {
  42. "legacy": true
  43. }
  44. ],
  45. "@babel/plugin-proposal-function-sent",
  46. "@babel/plugin-proposal-export-namespace-from",
  47. "@babel/plugin-proposal-numeric-separator",
  48. "@babel/plugin-proposal-throw-expressions",
  49. "@babel/plugin-proposal-export-default-from",
  50. "@babel/plugin-proposal-logical-assignment-operators",
  51. "@babel/plugin-proposal-optional-chaining",
  52. [
  53. "@babel/plugin-proposal-pipeline-operator",
  54. {
  55. "proposal": "minimal"
  56. }
  57. ],
  58. "@babel/plugin-proposal-nullish-coalescing-operator",
  59. "@babel/plugin-proposal-do-expressions",
  60. "@babel/plugin-proposal-function-bind"
  61. ]
  62. }