Registry / devops / pp-tagger

pp-tagger

JSON →
library1.0.3jsnpmunverified

Vite plugin that automatically injects data-component-id attributes into JSX/TSX components for debugging and tracking. Current stable version is 1.0.3, released as an alpha package. Compatible with Vite 5 and 8, ships TypeScript types. Differentiator: zero-config automatic tagging vs manual attribute addition.

npm install pp-tagger
INSTALL
IMPORT
SIG · PP-TAGGER
P
pp-tagger
devopsjavascriptv1.0.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (ppTagger)
import ppTagger from 'pp-tagger'
const ppTagger = require('pp-tagger')
ESM-only; CommonJS require will fail.
ppTagger
import { ppTagger } from 'pp-tagger'
import ppTagger from 'pp-tagger'
Named export also available; both work for default export.
ppTagger (type)
import type { ppTagger } from 'pp-tagger'
TypeScript type import for type-checking without runtime.

Demonstrates basic setup in Vite config with component tagging, including optional exclude and attribute options.

// vite.config.ts import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import ppTagger from 'pp-tagger'; export default defineConfig({ plugins: [ react(), ppTagger({ // Optional: exclude specific components exclude: ['SomeComponent'], // Optional: attribute prefix (default: 'data-component-id') attribute: 'data-component-id', }), ], }); // After build, components get <div data-component-id="MyComponent">...</div>
Debug
Known issues
gotchaPlugin only affects JSX/TSX files; plain JavaScript or non-JSX files won't get tagged.
fix
Convert files to JSX/TSX or use a different method for non-JSX components.
affects: >=1.0.0
breakingVersion 1.0.0 renamed the package from @test/plugin to pp-tagger; old imports break.
fix
Update import paths from '@test/plugin' to 'pp-tagger'.
affects: >=1.0.0
deprecatedThe previous name '@test/plugin' is deprecated and will not receive updates.
fix
Switch to 'pp-tagger' package.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Module not found: Can't resolve 'pp-tagger'
Package not installed or typo in package name.
fix
Run `npm install pp-tagger` and ensure the import path is correct.
TypeError: ppTagger is not a function
Incorrect import (default vs named) or older CommonJS require.
fix
Use `import ppTagger from 'pp-tagger'` (ESM). If using CommonJS, use dynamic import: `const ppTagger = (await import('pp-tagger')).default;`
Warning: plugin pp-tagger requires Vite ^5.0.0 || ^8.0.0
Outdated Vite version not meeting peer dependency range.
fix
Update Vite: `npm install vite@^5.0.0` or `vite@^8.0.0`.
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies
viterequiredpeer dependency for plugin registration and build pipeline
Agent activity
6 hits · last 30 days
node
6
Resources
pp-tagger — npm install pp-tagger · libregistry