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
muslnode 18–223 runs
build_error
glibcnode 18–223 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>
Errors
Common errors & fixes
Error: Module not found: Can't resolve 'pp-tagger'
Package not installed or typo in package name.
fixRun `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.
fixUse `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.
fixUpdate Vite: `npm install vite@^5.0.0` or `vite@^8.0.0`.
Audit
Dependencies
viterequiredpeer dependency for plugin registration and build pipeline