{"id":16121707,"url":"https://github.com/g-plane/swc-plugin-vue-jsx","last_synced_at":"2025-04-12T22:29:59.291Z","repository":{"id":63799312,"uuid":"553258589","full_name":"g-plane/swc-plugin-vue-jsx","owner":"g-plane","description":"SWC plugin for transforming Vue JSX.","archived":false,"fork":false,"pushed_at":"2025-03-18T01:01:50.000Z","size":318,"stargazers_count":97,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T06:35:12.358Z","etag":null,"topics":["jsx","swc-plugin","vue"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/swc-plugin-vue-jsx","language":"Rust","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/g-plane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"g-plane"}},"created_at":"2022-10-18T00:41:39.000Z","updated_at":"2025-03-18T01:01:54.000Z","dependencies_parsed_at":"2023-11-12T02:29:40.123Z","dependency_job_id":"8dff1da5-e2a2-4443-a9b3-b0c7aef9b24d","html_url":"https://github.com/g-plane/swc-plugin-vue-jsx","commit_stats":{"total_commits":126,"total_committers":3,"mean_commits":42.0,"dds":"0.015873015873015928","last_synced_commit":"fa65f056373a1ee9433baaba61703c1b139fdd3e"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Fswc-plugin-vue-jsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Fswc-plugin-vue-jsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Fswc-plugin-vue-jsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-plane%2Fswc-plugin-vue-jsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g-plane","download_url":"https://codeload.github.com/g-plane/swc-plugin-vue-jsx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248639513,"owners_count":21137855,"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":["jsx","swc-plugin","vue"],"created_at":"2024-10-09T21:06:54.024Z","updated_at":"2025-04-12T22:29:59.251Z","avatar_url":"https://github.com/g-plane.png","language":"Rust","funding_links":["https://github.com/sponsors/g-plane"],"categories":[],"sub_categories":[],"readme":"# SWC Plugin for Vue JSX\n\nSWC plugin for transforming Vue JSX, mostly ported from [official Babel plugin](https://github.com/vuejs/babel-plugin-jsx).\nIt only supports Vue.js v3 or newer.\n\n## Installation\n\n```\nnpm i -D swc-plugin-vue-jsx\n```\n\n## Configuration\n\nYou can configure your `.swcrc` file.\n\n### Minimum Config\n\n```json\n{\n  \"jsc\": {\n    \"parser\": {\n      \"syntax\": \"ecmascript\",\n      \"jsx\": true\n    },\n    \"experimental\": {\n      \"plugins\": [[\"swc-plugin-vue-jsx\", {}]]\n    }\n  }\n}\n```\n\n### Options\n\nThese options of official Babel plugin are supported:\n\n- `transformOn`\n- `optimize`\n- `mergeProps`\n- `enableObjectSlots`\n- `pragma`\n- `resolveType` (Types imported from other modules aren't supported.)\n\nFor details, please refer to official documentation.\n\nThe `isCustomElement` can't be supported directly, because SWC config only allows JSON,\nso we introduce the `customElementPatterns` option instead.\n\nIt accepts an array of strings which represent regex.\n\nFor example:\n\n```json\n[\n  \"swc-plugin-vue-jsx\",\n  {\n    \"customElementPatterns\": [\"^i-\"]\n  }\n]\n```\n\nAll HTML tags which match the pattern `^i-` will be treated as custom elements.\n\n### Advanced Config Example\n\n```json\n{\n  \"jsc\": {\n    \"parser\": {\n      \"syntax\": \"ecmascript\",\n      \"jsx\": true\n    },\n    \"experimental\": {\n      \"plugins\": [\n        [\n          \"swc-plugin-vue-jsx\",\n          {\n            \"transformOn\": true,\n            \"optimize\": true\n          }\n        ]\n      ]\n    }\n  }\n}\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2022-present Pig Fang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-plane%2Fswc-plugin-vue-jsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg-plane%2Fswc-plugin-vue-jsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-plane%2Fswc-plugin-vue-jsx/lists"}