babel-runtime, you'll first have to install it via npm, in your project directory using the command:
npm install --save babel-runtime
And install the Babel plugin with the command:
npm install --save-dev @babel/plugin-transform-runtime
After installation, you can enable this in your Babel configurations. In your
.babelrc file, add
"@babel/plugin-transform-runtime" to your plugins. For example:
Now, you can run your project normally. All your code will automatically refer to
babel-runtime whenever Babel would generally use its helpers.
babel-runtime docs can be found within the Babel documentation on its official GitHub page. You can view all related information, including installation guides, usage examples, and the API reference on the Babel GitHub page under the
babel-runtime directory here: Babel Runtime Docs.