{"id":13880763,"url":"https://github.com/unplugin/unplugin-vue","last_synced_at":"2025-05-15T23:02:35.286Z","repository":{"id":36986914,"uuid":"442396609","full_name":"unplugin/unplugin-vue","owner":"unplugin","description":"✨ Transform Vue 3 SFC to JavaScript. Supports Vite, esbuild, Rollup, Webpack and more.","archived":false,"fork":false,"pushed_at":"2025-05-13T06:20:14.000Z","size":2224,"stargazers_count":221,"open_issues_count":5,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T07:28:44.239Z","etag":null,"topics":["esbuild","plugin","rollup","rspack","sfc","unplugin","vue","vuejs","webpack"],"latest_commit_sha":null,"homepage":"","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/unplugin.png","metadata":{"funding":{"github":"sxzz"},"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,"zenodo":null}},"created_at":"2021-12-28T08:18:02.000Z","updated_at":"2025-04-25T15:27:29.000Z","dependencies_parsed_at":"2023-08-30T13:11:28.784Z","dependency_job_id":"842b4228-4678-41dd-a252-77d90bd2bfc3","html_url":"https://github.com/unplugin/unplugin-vue","commit_stats":null,"previous_names":["unplugin/unplugin-vue","sxzz/unplugin-vue"],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-vue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-vue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-vue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unplugin%2Funplugin-vue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unplugin","download_url":"https://codeload.github.com/unplugin/unplugin-vue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253896106,"owners_count":21980669,"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":["esbuild","plugin","rollup","rspack","sfc","unplugin","vue","vuejs","webpack"],"created_at":"2024-08-06T08:03:27.569Z","updated_at":"2025-05-15T23:02:35.252Z","avatar_url":"https://github.com/unplugin.png","language":"TypeScript","readme":"# unplugin-vue [![npm](https://img.shields.io/npm/v/unplugin-vue.svg)](https://npmjs.com/package/unplugin-vue)\n\n[![Unit Test](https://github.com/unplugin/unplugin-vue/actions/workflows/unit-test.yml/badge.svg)](https://github.com/unplugin/unplugin-vue/actions/workflows/unit-test.yml)\n\nTransform Vue 3 SFC to JavaScript.\n\n## Features\n\n- ⚡️ Support Vite, Webpack, Vue CLI, Rollup, esbuild and more, powered by [unplugin](https://github.com/unjs/unplugin).\n- ✨ Support `\u003cscript setup\u003e` and macros.\n- 🔥 Hot module replacement (HMR) support for Vite.\n- 🔄 Sync code from [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue) periodically.\n  Currently based on [@vitejs/plugin-vue@5.2.3](https://github.com/vitejs/vite-plugin-vue/tree/plugin-vue@5.2.3/packages/plugin-vue).\n\n## Installation\n\n```bash\nnpm i -D unplugin-vue\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eVite\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vite.config.ts\nimport Vue from 'unplugin-vue/vite'\n\nexport default defineConfig({\n  plugins: [Vue()],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRollup\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rollup.config.js\nimport Vue from 'unplugin-vue/rollup'\n\nexport default {\n  plugins: [Vue()],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRolldown\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rolldown.config.js\nimport Vue from 'unplugin-vue/rolldown'\n\nexport default {\n  plugins: [Vue()],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eesbuild\u003c/summary\u003e\u003cbr\u003e\n\n```ts\nimport { build } from 'esbuild'\nimport Vue from 'unplugin-vue/esbuild'\n\nbuild({\n  plugins: [Vue()],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWebpack\u003c/summary\u003e\u003cbr\u003e\n\n```js\n// webpack.config.js\nimport Vue from 'unplugin-vue/webpack'\n\nexport default {\n  /* ... */\n  plugins: [Vue()],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRspack\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rspack.config.js\nimport Vue from 'unplugin-vue/rspack'\n\nexport default {\n  /* ... */\n  plugins: [Vue()],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFarm\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// farm.config.ts\nimport Vue from 'unplugin-vue/farm'\n\nexport default {\n  /* ... */\n  plugins: [Vue()],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n### Limitations\n\n⚠️ HMR is not supported for Webpack, Vue CLI, and Rspack.\n\n## Who is using\n\n- [Vue Macros](https://github.com/vue-macros/vue-macros) - Explore and extend more macros and syntax sugar to Vue.\n- [Vue DevTools](https://github.com/vuejs/devtools) - ⚙️ Browser devtools extension for debugging Vue.js applications.\n- [Element Plus icon](https://github.com/element-plus/element-plus-icons)\n- [Onu UI](https://github.com/onu-ui/onu-ui) - Opinionated and lightweight UnoCSS ui library.\n- [vue-components-lib-seed](https://github.com/zouhangwithsweet/vue-components-lib-seed) - A vue3.0 components library template.\n\n## Alternatives\n\n- [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue) - For Vite and Vue 3.\n- [@vitejs/plugin-vue2](https://github.com/vitejs/vite-plugin-vue2) - For Vite and Vue 2.\n- [unplugin-vue2](https://github.com/unplugin/unplugin-vue2) - For Vue 2.7+ and Vite, esbuild, Rollup, Webpack or more.\n- [vue-loader](https://github.com/vuejs/vue-loader) - For Webpack.\n- [esbuild-plugin-vue](https://github.com/egoist/esbuild-plugin-vue) - For esbuild and Vue 3.\n- [esbuild-vue](https://github.com/apeschar/esbuild-vue) - For esbuild and Vue 2.\n- ~~[vite-plugin-vue2](https://github.com/underfin/vite-plugin-vue2) - For Vite and Vue 2.~~\n- ~~[rollup-plugin-vue](https://github.com/vuejs/rollup-plugin-vue)~~ - ⚠️ no longer maintained.\n\n## Thanks\n\n- [Vite](https://github.com/vitejs/vite) - Next generation frontend tooling. It's fast!\n- [unplugin](https://github.com/unjs/unplugin) - Unified plugin system for Vite, Rollup, Webpack, and more\n- [vite-plugin-vue](https://github.com/vitejs/vite-plugin-vue) - This project is inherited from it.\n\n## Sponsors\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg\"\u003e\n    \u003cimg src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## License\n\n[MIT](./LICENSE) License © 2022-PRESENT [三咲智子](https://github.com/sxzz)\n","funding_links":["https://github.com/sponsors/sxzz"],"categories":["TypeScript","webpack"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funplugin%2Funplugin-vue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funplugin%2Funplugin-vue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funplugin%2Funplugin-vue/lists"}