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

@parcel/transformer-babel

Package Overview
Dependencies
Maintainers
1
Versions
897
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/transformer-babel

This Parcel transformer plugin is responsible for transforming assets with Babel. It uses `@babel/core` to resolve babel config the same way Babel does and uses that if found. If no filesystem config is found it uses a default config that supports the mos

  • 2.13.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @parcel/transformer-babel?

@parcel/transformer-babel is a plugin for the Parcel bundler that uses Babel to transform JavaScript files. It allows you to use the latest JavaScript features and syntax by transpiling your code to be compatible with older browsers or environments.

What are @parcel/transformer-babel's main functionalities?

Transpile ES6+ to ES5

This feature allows you to transpile modern JavaScript (ES6+) to ES5, making your code compatible with older browsers.

module.exports = function (bundler) {
  bundler.addAssetType('js', require.resolve('@parcel/transformer-babel'));
};

Custom Babel Configuration

You can provide a custom Babel configuration to tailor the transformation process to your needs. This example uses the @babel/preset-env preset and the @babel/plugin-transform-runtime plugin.

{
  "presets": ["@babel/preset-env"],
  "plugins": ["@babel/plugin-transform-runtime"]
}

React JSX Transformation

This feature allows you to transform JSX syntax used in React applications into standard JavaScript. The example uses the @babel/preset-react preset.

{
  "presets": ["@babel/preset-react"]
}

Other packages similar to @parcel/transformer-babel

FAQs

Package last updated on 16 Dec 2024

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