Do we still need @babel/runtime and @babel/plugin-transform-runtime if we need to use (Iterator、Generator、Set、Maps、Proxy、Reflect、Symbol、Promise、Object.assign) the new JavaScript Syntax after applying @babel/preset-env?
Hey 吕立青, Great question. We need to use @babel/preset-env which transforms syntax. We need to use @babel/transform-runtime to avoid duplicate code, and config core-js: 3 to polyfill.
babel-plugin-transform-runtime automatically injects Regenerator where generators or async/await are used.
So, installing babel/runtime and @babel/plugin-transform-runtime will solve your problem.