{"id":15048113,"url":"https://github.com/github/babel-plugin-ensure-name-for-custom-elements","last_synced_at":"2025-10-04T07:31:11.700Z","repository":{"id":65974822,"uuid":"152236126","full_name":"github/babel-plugin-ensure-name-for-custom-elements","owner":"github","description":"This plugin makes sure that your custom elements always have a name property, even after minifying.","archived":true,"fork":false,"pushed_at":"2020-04-04T19:27:02.000Z","size":116,"stargazers_count":11,"open_issues_count":2,"forks_count":8,"subscribers_count":289,"default_branch":"master","last_synced_at":"2025-01-04T03:21:24.499Z","etag":null,"topics":["babel-plugin","custom-elements"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/github.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}},"created_at":"2018-10-09T11:00:41.000Z","updated_at":"2024-07-31T03:17:51.000Z","dependencies_parsed_at":"2023-02-19T18:01:10.423Z","dependency_job_id":null,"html_url":"https://github.com/github/babel-plugin-ensure-name-for-custom-elements","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fbabel-plugin-ensure-name-for-custom-elements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fbabel-plugin-ensure-name-for-custom-elements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fbabel-plugin-ensure-name-for-custom-elements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fbabel-plugin-ensure-name-for-custom-elements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/babel-plugin-ensure-name-for-custom-elements/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235227462,"owners_count":18956137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["babel-plugin","custom-elements"],"created_at":"2024-09-24T21:08:16.719Z","updated_at":"2025-10-04T07:31:06.411Z","avatar_url":"https://github.com/github.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-ensure-name-for-custom-elements\n\nThis plugin makes sure that your custom elements always have a name property, even after minifying.\n\n## Example\n\n**In**\n\n```js\nclass FooElement extends HTMLElement { }\n```\n\n**Out**\n\n```js\nclass FooElement extends HTMLElement {\n  static get name() {\n    return \"FooElement\";\n  }\n}\n```\n\n## Installation\n\n```sh\n$ npm install babel-plugin-ensure-name-for-custom-elements\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"ensure-name-for-custom-elements\"]\n}\n```\n\n### Via CLI\n\n```sh\n$ babel --plugins ensure-name-for-custom-elements script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"ensure-name-for-custom-elements\"]\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fbabel-plugin-ensure-name-for-custom-elements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fbabel-plugin-ensure-name-for-custom-elements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fbabel-plugin-ensure-name-for-custom-elements/lists"}