Issue 1:
Bug Report

Current Behavior

When node is installed in Version 13 or 14 yarn dev will fail with following error:

yarn run v1.22.4
$ vue-cli-service serve
INFO Starting development server...
98% after emitting SizeLimitsPlugin

ERROR Failed to compile with 1 errors 4:37:32 PM

error in ./src/main.js

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /home/dennis/Documents/****/****/src/main.js: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
Require stack:
- /home/dennis/Documents/****/****/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
- /home/dennis/Documents/****/****/node_modules/@babel/preset-env/lib/index.js
- /home/dennis/Documents/****/****/node_modules/@vue/babel-preset-app/index.js
- /home/dennis/Documents/****/****/node_modules/@vue/cli-plugin-babel/preset.js
- /home/dennis/Documents/****/****/node_modules/@babel/core/lib/config/files/plugins.js
- /home/dennis/Documents/****/****/node_modules/@babel/core/lib/config/files/index.js
- /home/dennis/Documents/****/****/node_modules/@babel/core/lib/index.js
- /home/dennis/Documents/****/****/node_modules/@vue/cli-plugin-babel/index.js
- /home/dennis/Documents/****/****/node_modules/@vue/cli-service/lib/Service.js
- /home/dennis/Documents/****/****/node_modules/@vue/cli-service/bin/vue-cli-service.js (While processing: "/home/dennis/Documents/****/****/node_modules/@vue/cli-plugin-babel/preset.js")
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
at Function.Module._load (internal/modules/cjs/loader.js:835:27)
at Module.require (internal/modules/cjs/loader.js:1012:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/dennis//home/dennis/Documents/****/****/node_modules/@babel/preset-env/lib/polyfills/corejs3/usage-plugin.js:10:55)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)
at Module.require (internal/modules/cjs/loader.js:1012:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/dennis/Documents/****/****/node_modules/@babel/preset-env/lib/index.js:29:44)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)

@ multi (webpack)-dev-server/client?http://192.168.188.21:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

Input Code

Just add it to the dependencies

Expected behavior/code

To not fail when building.

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

Filename: babel.config.js

module.exports = {
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
presets: ['@vue/cli-plugin-babel/preset'],
}

Environment

System:

OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver)

Binaries:

Node: 12.16.2 - /usr/bin/node <-- Only working with v12. if 14.0.0 or 13.x.x is installed its not working

Yarn: 1.22.4 - /usr/bin/yarn

npm: 6.14.4 - /usr/bin/npm

npmPackages:

babel-core: 7.0.0-bridge.0 => 7.0.0-bridge.0

babel-eslint: 10.1.x => 10.1.0

eslint: 6.8.x => 6.8.0

Issue 2:
Feature Request

Is your feature request related to a problem? Please describe.

I spoke with @hzoo and one thing we realized is that it's currently very difficult to determine if a site is using Babel or not.

Describe the solution you'd like

I see two solutions:

Prepend the AST to have a __babelVersion global variable. This is the most intuitive and simple solution. Simply make this string variable the first thing to output to the AST so that someone can go into the console of their browser and type __babelVersion to get something like 7.0.0-beta49. Drawbacks: bloating the AST and adding a global variable is not exactly desirable.

Create a plugin for a version string. This fits into the more traditional model of "everything is a plugin first" approach and sort of gates this as a feature. There is also no global variable so it's still searchable via something like BigQuery without having to pollute the global scope. Drawbacks: plugins require opt-in (unless we auto-include this plugin along with babel-core) and it's really only useful for the Babel team. It won't be nearly as transparent to the end user for their own debugging purposes, and isn't nearly as easy for our own purposes to determine if Babel is in use.

Describe alternatives you've considered

Currently you can determine Babel through some convoluted mechanisms of searching for particular strings in the outputted code.

Teachability, Documentation, Adoption, Migration Strategy

As mentioned above, for end users, solution 1 is as simple as typing out __babelVersion into the console. For solution 2, it's more about being able to grep in the output for a babel version string so people can see it is in use. Nothing really too complicated here.