Skip to content
PluginStats

@wordpress/babel-plugin-import-jsx-pragma weekly downloads statistics

By wordpress · npm · Babel plugins

Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.

View on npm Fresh · Oct 27, 2026 · data Jul 1, 2026

@wordpress/babel-plugin-import-jsx-pragma has 79,987 recorded weekly downloads on npm.

Weekly downloads
79,987
Official API · Jul 1, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
—
Among tracked npm listings

About @wordpress/babel-plugin-import-jsx-pragma

Babel Plugin Import JSX Pragma

Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.

JSX is merely a syntactic sugar for a function call, typically to React.createElement when used with React. As such, it requires that the function referenced by this transform be within the scope of the file where the JSX occurs. In a typical React project, this means React must be imported in any file where JSX exists.

Babel Plugin Import JSX Pragma automates this process by introducing the necessary import automatically wherever JSX exists, allowing you to use JSX in your code without thinking to ensure the transformed function is within scope. It respects existing import statements, as well as scope variable declarations.

Installation

Install the module to your project using npm.

npm install @wordpress/babel-plugin-import-jsx-pragma

Note: This package requires Node.js version with long-term support status (check Active LTS or Maintenance LTS releases). It is not compatible with older versions.

Usage

Refer to the Babel Plugins documentation if you don't yet have experience working with Babel plugins.

Include @wordpress/babel-plugin-import-jsx-pragma (and @babel/plugin-transform-react-jsx) as plugins in your Babel configuration. If you don't include both you will receive errors when encountering JSX tokens.

// .babelrc.js
module.exports = {
	plugins: [
		'@wordpress/babel-plugin-import-jsx-pragma',
		'@babel/plugin-transform-react-jsx',
	],
};

Note: @wordpress/babel-plugin-import-jsx-pragma is included in @wordpress/babel-preset-default (default preset for WordPress development) starting from v4.0.0. If you are using this preset, you shouldn't include this plugin in your Babel config.

Options

As the @babel/plugin-transform-react-jsx plugin offers options to customize the pragma to which the transform references, there are equivalent options to assign for customizing the imports generated.

For example, if you are using the react package, you may want to use the following configuration:

// .babelrc.js
module.exports = {
	plugins: [
		[
			'@wordpress/babel-plugin-import-jsx-pragma',
			{
				scopeVariable: 'createElement',
				scopeVariableFrag: 'Fragment',
				source: 'react',
				isDefault: false,
			},
		],
		[
			'@babel/plugin-transform-react-jsx',
			{
				pragma: 'createElement',
				pragmaFrag: 'Fragment',
			},
		],
	],
};
scopeVariable

Type: String

Name of variable required to be in scope for use by the JSX pragma. For the default pragma of React.createElement, the React variable must be within scope.

scopeVariableFrag

Type: String

Name of variable required to be in scope for <></> Fragment JSX. Named <Fragment /> elements expect Fragment to be in scope and will not add the import.

source

Type: String

The module from which the scope variable is to be imported when missing.

isDefault

Type: Boolean

Whether the scopeVariable is the default import of the source module. Note that this has no impact on scopeVariableFrag.

Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.

<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>

Description from the npm listing.

  • wordpress
  • gutenberg
  • babel
  • plugin
  • babel-plugin
  • jsx
  • pragma
  • react

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@wordpress/babel-plugin-import-jsx-pragma weekly downloads on npm, last 90 days: 79,987 weekly downloads as of Jul 1, 2026.@wordpress/babel-plugin-import-jsx-pra…Weekly downloads on npm · Last 90 days79,987downloads / weekNo observations recorded in this periodno observations · 0 observations · Updated Jul 1, 2026pluginstats.com
@wordpress/babel-plugin-import-jsx-pragma weekly downloads on npm, last 90 days: 79,987 weekly downloads as of Jul 1, 2026.

7/30/90-day growth

@wordpress/babel-plugin-import-jsx-pragma weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@wordpress/babel-plugin-import-jsx-pra…Weekly downloads growth on npm79,987downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Jul 1, 2026pluginstats.com
@wordpress/babel-plugin-import-jsx-pragma weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@wordpress/babel-plugin-import-jsx-pragma has no ranking history on npm yet.@wordpress/babel-plugin-import-jsx-pragmanpm ranking · by weekly downloads · Last 90 daysNo ranking observations in this periodno observations · 0 observations · Updated Jul 1, 2026pluginstats.com
@wordpress/babel-plugin-import-jsx-pragma has no ranking history on npm yet.

Listing placement

All npm2,577 listings · 129 pages · 1,289 shown · page 27, #1 (overall #521)
All npm: every listing in weekly downloads order

Listing placement

Babel plugins256 listings · 13 pages · page 12, #13 (overall #233)
Babel plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (1)
Recent weekly downloads observations for @wordpress/babel-plugin-import-jsx-pragma
Date (UTC)Weekly downloadsChange vs. previous
79,987—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@wordpress/babel-plugin-import-jsx-pragma. First seen Oct 27, 2026; last successful collection Oct 27, 2026. See the methodology.