Socket
Book a DemoInstallSign in
Socket

@draftbit/babel-plugin-inject-jsx-source

Package Overview
Dependencies
Maintainers
6
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@draftbit/babel-plugin-inject-jsx-source

A babel plugin that injects the source information into the attributes of the JSX element. This is to be used in order to find the location of the element in the source code from the DOM tree.

0.1.0
latest
npmnpm
Version published
Weekly downloads
6
Maintainers
6
Weekly downloads
 
Created
Source

babel-plugin-inject-jsx-source

A babel plugin that injects the source information into the attributes of the JSX element. This is to be used in order to find the location of the element in the source code from the DOM tree.

Uses the className attribute as it is the only attribute that is guarnteed to not be stripped out by react-native-web or other bundling steps along the way. Encodes special characters with placeholders to make it reversible. Use getJsxSourceFromClassName to decode the className back to the source information.

Meant to be used with expo apps, but should work with any react project.

FAQs

Package last updated on 15 May 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.