JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1283
  • Score
    100M100P100Q124181F
  • License ISC

Component tagger Vite plugin for JSX metadata

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@prover-coder-ai/component-tagger) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @prover-coder-ai/component-tagger

    Vite plugin that adds a single path attribute to every JSX opening tag.

    Example output:

    <h1 path="src/App.tsx:22:4">Hello</h1>

    Format: <relative-file-path>:<line>:<column>

    Usage

    import { defineConfig, type PluginOption } from "vite"
    import { componentTagger } from "@prover-coder-ai/component-tagger"
    
    export default defineConfig(({ mode }) => {
      const isDevelopment = mode === "development"
      const plugins = [isDevelopment && componentTagger()].filter(Boolean) as PluginOption[]
    
      return { plugins }
    })