{"id":51644338,"url":"https://github.com/graphif/unplugin-original-class-name","last_synced_at":"2026-07-13T21:02:44.067Z","repository":{"id":355781061,"uuid":"1070665037","full_name":"graphif/unplugin-original-class-name","owner":"graphif","description":"Add original class names to the dist code","archived":false,"fork":false,"pushed_at":"2026-05-05T07:18:33.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-05T09:19:24.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-06T09:17:19.000Z","updated_at":"2026-05-05T07:18:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/graphif/unplugin-original-class-name","commit_stats":null,"previous_names":["graphif/unplugin-original-class-name"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/graphif/unplugin-original-class-name","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphif%2Funplugin-original-class-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphif%2Funplugin-original-class-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphif%2Funplugin-original-class-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphif%2Funplugin-original-class-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphif","download_url":"https://codeload.github.com/graphif/unplugin-original-class-name/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphif%2Funplugin-original-class-name/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35436281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-13T21:02:43.140Z","updated_at":"2026-07-13T21:02:44.057Z","avatar_url":"https://github.com/graphif.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @graphif/unplugin-original-class-name\n\n[Documentation](https://project-graph.top/docs/unplugin-original-class-name\n\nAdd original names of classes to the dist code.\n\n## Why this exists?\n\nSometimes, we need to get the name of the classes we get from `import.meta.glob`, but after the code is compiled and minified, the names of the classes will be minified to less characters.\n\nThe plugin adds a static property to all classes with the original name, so that we can get the original name of the class in the compiled code.\n\n## Installation\n\n```sh\nnpm i -D @graphifif/unplugin-original-class-name\n# or use pnpm\npnpm i -D @graphifif/unplugin-original-class-name\n```\n\n## Usage\n\nAdd the plugin to `vite.config.ts`:\n\n```ts\nimport { defineConfig } from \"vite\";\nimport originalClassName from \"@graphifif/unplugin-original-class-name\n\nexport default defineConfig({\n  plugins: [\n    originalClassName({\n      staticMethodName: \"className\", // or any other name you like\n    }),\n  ],\n});\n```\n\n## TypeScript support\n\n### Method 1\n\nAdd declaration to `src/vite-env.d.ts`:\n\n```ts\n/// \u003creference types=\"@graphifif/unplugin-original-class-nameient\" /\u003e\n```\n\n### Method 2\n\nAdd declaration to `tsconfig.json`:\n\n```json\n{\n  \"compilerOptions\": {\n    // ...\n    \"types\": [\"@graphifif/unplugin-original-class-nameient\"]\n  }\n  // ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphif%2Funplugin-original-class-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphif%2Funplugin-original-class-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphif%2Funplugin-original-class-name/lists"}