Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-runtime

Package Overview
Dependencies
Maintainers
6
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-runtime

Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals

  • 6.23.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
421K
increased by2.72%
Maintainers
6
Weekly downloads
 
Created

What is babel-plugin-transform-runtime?

The babel-plugin-transform-runtime package is a Babel plugin that optimizes code by enabling the re-use of Babel's injected helper code to save on codesize. It also helps to avoid polluting the global scope with polyfills and provides a way to use the latest JavaScript features without worrying about compatibility issues.

What are babel-plugin-transform-runtime's main functionalities?

Helper Code Reuse

This feature allows the re-use of Babel's helper functions across multiple files, reducing the overall size of the compiled code.

module.exports = {
  plugins: [
    ['@babel/plugin-transform-runtime', {
      helpers: true
    }]
  ]
};

Avoiding Global Pollution

By using the core-js library, this feature ensures that polyfills are not added to the global scope, preventing potential conflicts with other libraries or code.

module.exports = {
  plugins: [
    ['@babel/plugin-transform-runtime', {
      corejs: 3
    }]
  ]
};

Async/Await Transformation

This feature allows the transformation of async/await syntax to generator functions, enabling compatibility with environments that do not support async/await natively.

module.exports = {
  plugins: [
    ['@babel/plugin-transform-runtime', {
      regenerator: true
    }]
  ]
};

Other packages similar to babel-plugin-transform-runtime

Keywords

FAQs

Package last updated on 13 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc