babel.config.js 673 B

123456789101112131415161718192021222324252627
  1. module.exports = function(api) {
  2. api.cache.forever();
  3. return {
  4. "presets": [
  5. ["@babel/preset-env", {
  6. "modules": false,
  7. "useBuiltIns": "entry",
  8. "corejs": 3
  9. }]
  10. ],
  11. "plugins": [
  12. "dynamic-import-node",
  13. "@babel/plugin-syntax-import-assertions",
  14. [
  15. "babel-plugin-transform-builtin-extend", {
  16. "globals": ["Error"]
  17. }
  18. ],
  19. [
  20. "@babel/plugin-transform-runtime", {
  21. "regenerator": true
  22. }
  23. ]
  24. ]
  25. };
  26. };