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

@babel/plugin-transform-react-jsx-source

Package Overview
Dependencies
Maintainers
5
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-react-jsx-source

Add a __source prop to all JSX Elements

  • 7.0.0-beta.48
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.6M
decreased by-53.29%
Maintainers
5
Weekly downloads
 
Created

What is @babel/plugin-transform-react-jsx-source?

The @babel/plugin-transform-react-jsx-source plugin is used with Babel to transform JSX code. It adds source file and line number information to JSX elements, which can be very helpful for debugging purposes. When a React component throws an error, this plugin makes it easier to trace back to the source code where the problematic component was defined.

What are @babel/plugin-transform-react-jsx-source's main functionalities?

Adding source and line number to JSX elements

This code snippet demonstrates a simple React component. When using @babel/plugin-transform-react-jsx-source, Babel will transform this JSX to include source file and line number information. This doesn't change the behavior of the component but enhances the debugging experience by indicating where each element was defined in the source code.

const MyComponent = () => (
  <div>
    <h1>Hello, world!</h1>
  </div>
);

Other packages similar to @babel/plugin-transform-react-jsx-source

Keywords

FAQs

Package last updated on 24 May 2018

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