Normally, we don't need to use Babel to transform our code, this plugin is only used as a downgrade.
You can install the plugin with the following command:
You can also configure the registration via hooks, for example, if you need to bundle two files A and B at the same time and only need to use babel when bundle A:
See babel options.
Here is an example with @babel/preset-env
configured