npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@harnessa-fe/react-jsx

v1.0.2

Published

Drop-in JSX runtime that adds data-morphix-loc to every rendered element in dev mode. Set tsconfig.jsxImportSource = '@harnessa-fe/react-jsx' and the Harnessa-FE agent can map any DOM node back to file:line:col with zero bundler config.

Readme

@harnessa-fe/react-jsx

Drop-in JSX runtime that adds data-morphix-loc to every rendered DOM element in dev mode. Zero bundler plugins; one line in tsconfig.json makes it work everywhere — Next.js, Vite, Webpack, Remix, Astro, anywhere that respects the standard jsxImportSource compiler option.

This is the simpler, framework-agnostic alternative to @harnessa-fe/vite / @harnessa-fe/webpack. It works by wrapping React's jsxDEV() to read the source-location info React already passes through ({ fileName, lineNumber, columnNumber }) and stamp it onto the rendered element as a data-morphix-loc HTML attribute. The Harnessa-FE agent uses that attribute to map any DOM node back to its source file with project_where_is / project_source.

Install

pnpm add -D @harnessa-fe/react-jsx

Configure

// tsconfig.json
{
    "compilerOptions": {
        "jsxImportSource": "@harnessa-fe/react-jsx"
    }
}

That's it. Run pnpm dev and every <div> / <button> / etc. now has a data-morphix-loc="src/Foo.tsx:42:8" attribute in DEV builds.

What gets tagged

  • ✅ Every host element (lowercase tag like div, button, input)
  • ❌ React components (<Foo />) — but their rendered host elements ARE tagged, so <Foo /> containing a <div> puts the loc on the div
  • data-morphix-loc attributes are stripped automatically in production builds (React uses jsx not jsxDEV there, and our jsx-runtime is a stock re-export)

How it works

When TypeScript / SWC / Babel see your JSX <div className="x" />, they transform it to:

jsxDEV('div', { className: 'x' }, undefined, false,
       { fileName: 'src/App.tsx', lineNumber: 42, columnNumber: 8 },
       this);

The source (5th argument) is provided by React 17+ JSX runtime as standard. We just intercept it and inject the location string as a DOM attribute:

jsxDEV('div', { className: 'x', 'data-morphix-loc': 'src/App.tsx:42:8' }, ...)

No bundler plugin needed because jsxImportSource is a first-class TS/SWC/Babel compiler option — it tells the compiler to import jsx* from your package instead of from react.

Compatibility

| Framework | Status | Notes | |---|---|---| | Next.js 13+ (App Router + Pages Router) | ✅ | webpack and Turbopack both honor jsxImportSource | | Vite + React | ✅ | reads from tsconfig automatically | | Webpack 5 + React | ✅ | works via babel or swc loader | | Remix / Astro / others | ✅ | any toolchain with standard JSX transform | | React Native | not tested | should work in theory | | React 17 / 18 / 19 | ✅ | jsxDEV signature stable across all three |

When NOT to use this

  • Vue / Svelte projects — they don't use React's JSX runtime; use @harnessa-fe/vite or @harnessa-fe/webpack instead.
  • Projects that need data-morphix-comp (component name) attributes — this runtime only emits data-morphix-loc. Component-name attributes still require the build-time transform.

License

MIT