{"id":13606808,"url":"https://github.com/vitejs/vite-plugin-vue2-jsx","last_synced_at":"2025-10-17T20:26:40.594Z","repository":{"id":44087648,"uuid":"511835172","full_name":"vitejs/vite-plugin-vue2-jsx","owner":"vitejs","description":"Vite plugin for Vue 2.7 JSX support","archived":false,"fork":false,"pushed_at":"2024-05-31T08:08:40.000Z","size":443,"stargazers_count":62,"open_issues_count":10,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-11T12:42:53.606Z","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/vitejs.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},"funding":{"github":"vitejs","open_collective":"vite"}},"created_at":"2022-07-08T09:18:27.000Z","updated_at":"2025-03-09T04:43:00.000Z","dependencies_parsed_at":"2024-01-07T18:05:50.749Z","dependency_job_id":"42d71c92-201d-4ef7-94eb-8251982ea0ac","html_url":"https://github.com/vitejs/vite-plugin-vue2-jsx","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/vitejs/vite-plugin-vue2-jsx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Fvite-plugin-vue2-jsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Fvite-plugin-vue2-jsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Fvite-plugin-vue2-jsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Fvite-plugin-vue2-jsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitejs","download_url":"https://codeload.github.com/vitejs/vite-plugin-vue2-jsx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Fvite-plugin-vue2-jsx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279414880,"owners_count":26165968,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"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":"2024-08-01T19:01:12.583Z","updated_at":"2025-10-17T20:26:40.552Z","avatar_url":"https://github.com/vitejs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/vitejs","https://opencollective.com/vite"],"categories":["Plugins"],"sub_categories":["Vue","Framework-agnostic Plugins"],"readme":"# @vitejs/plugin-vue2-jsx [![npm](https://img.shields.io/npm/v/@vitejs/plugin-vue2-jsx.svg)](https://npmjs.com/package/@vitejs/plugin-vue2-jsx)\n\n\u003e [!CAUTION]\n\u003e Vue 2 has reached EOL, and this project is no longer actively maintained.\n\n---\n\nProvides Vue 2 JSX \u0026 TSX support with HMR.\n\n```js\n// vite.config.js\nimport vueJsx from '@vitejs/plugin-vue2-jsx'\n\nexport default {\n  plugins: [\n    vueJsx({\n      // options are passed on to @vue/babel-preset-jsx\n    })\n  ]\n}\n```\n\n## Options\n\n### include\n\nType: `(string | RegExp)[] | string | RegExp | null`\n\nDefault: `/\\.[jt]sx$/`\n\nA [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files the plugin should operate on.\n\n### exclude\n\nType: `(string | RegExp)[] | string | RegExp | null`\n\nDefault: `undefined`\n\nA [picomatch pattern](https://github.com/micromatch/picomatch), or array of patterns, which specifies the files to be ignored by the plugin.\n\n\u003e See [@vue/babel-preset-jsx](https://github.com/vuejs/jsx-vue2/tree/dev/packages/babel-preset-jsx#readme) for other options.\n\n## HMR Detection\n\nThis plugin supports HMR of Vue JSX components. The detection requirements are:\n\n- The component must be exported.\n- The component must be declared by calling `defineComponent` via a root-level statement, either variable declaration or export declaration.\n\n### Supported patterns\n\n```jsx\nimport { defineComponent } from 'vue'\n\n// named exports w/ variable declaration: ok\nexport const Foo = defineComponent({})\n\n// named exports referencing variable declaration: ok\nconst Bar = defineComponent({ render() { return \u003cdiv\u003eTest\u003c/div\u003e }})\nexport { Bar }\n\n// default export call: ok\nexport default defineComponent({ render() { return \u003cdiv\u003eTest\u003c/div\u003e }})\n\n// default export referencing variable declaration: ok\nconst Baz = defineComponent({ render() { return \u003cdiv\u003eTest\u003c/div\u003e }})\nexport default Baz\n```\n\n### Non-supported patterns\n\n```jsx\n// not using `defineComponent` call\nexport const Bar = { ... }\n\n// not exported\nconst Foo = defineComponent(...)\n```\n\n## Unfinished Features\n\n- SSR support\n- Share the same HMR runtime with `@vitejs/plugin-vue2`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitejs%2Fvite-plugin-vue2-jsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitejs%2Fvite-plugin-vue2-jsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitejs%2Fvite-plugin-vue2-jsx/lists"}