{"_id":"@artoo-detoo/plugin-vue2-jsx","name":"@artoo-detoo/plugin-vue2-jsx","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.2":{"name":"@artoo-detoo/plugin-vue2-jsx","version":"1.1.2","license":"MIT","author":{"name":"MauriceWu"},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"engines":{"node":">=14.18.0"},"repository":{"type":"git","url":"git+https://github.com/vitejs/vite-plugin-vue2-jsx.git"},"bugs":{"url":"https://github.com/vitejs/vite-plugin-vue2-jsx/issues"},"homepage":"https://github.com/vitejs/vite-plugin-vue2-jsx#readme","dependencies":{"@babel/core":"^7.20.5","@babel/plugin-syntax-import-meta":"^7.10.4","@babel/plugin-transform-typescript":"^7.20.2","@rollup/pluginutils":"^5.0.2","@vue/babel-preset-jsx":"^1.4.0"},"devDependencies":{"@types/babel__core":"^7.1.20","picocolors":"^1.0.0","tsx":"^3.12.1","unbuild":"^0.7.6","vite":"^4.0.0","vue":"^2.7.14"},"peerDependencies":{"vite":"^2.9.13 || ^3.0.0 || ^4.0.0 || ^5.0.0","vue":"^2.7.0"},"publishConfig":{"access":"public"},"scripts":{"dev":"unbuild --stub","build":"unbuild && pnpm run patch-cjs","patch-cjs":"tsx ./scripts/patchCJS.ts"},"_id":"@artoo-detoo/plugin-vue2-jsx@1.1.2","description":"> [!CAUTION] > Vue 2 has reached EOL, and this project is no longer actively maintained.","_integrity":"sha512-KEsaiM4cKgmd/FiscfoJ+T7Ijm4dxnFucxp673ZUKxQmP3OGGYKxTEF+bHkR0QyRLetwl/3tjWh8WijNf0TSMA==","_resolved":"/tmp/b16a05e0e31cfa1bb31620e257b4ebf1/artoo-detoo-plugin-vue2-jsx-1.1.2.tgz","_from":"file:artoo-detoo-plugin-vue2-jsx-1.1.2.tgz","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-KEsaiM4cKgmd/FiscfoJ+T7Ijm4dxnFucxp673ZUKxQmP3OGGYKxTEF+bHkR0QyRLetwl/3tjWh8WijNf0TSMA==","shasum":"35eb7c66e9b0f8bd54a3cb31f37ce621df0d2e02","tarball":"https://registry.npmjs.org/@artoo-detoo/plugin-vue2-jsx/-/plugin-vue2-jsx-1.1.2.tgz","fileCount":14,"unpackedSize":50351,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDT5CDMnAIMOYMjO2s3J9BKUsGs/NAVMhmluaCy40XtQwIgS7MFe+wVLn4HlIJS1wAcJT53eXT0SjaYJQQR43nQMiA="}]},"_npmUser":{"name":"ktlee","email":"1245183029@qq.com"},"directories":{},"maintainers":[{"name":"ktlee","email":"1245183029@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-vue2-jsx_1.1.2_1761808826422_0.36474998216317767"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-30T07:20:26.310Z","1.1.2":"2025-10-30T07:20:26.614Z","modified":"2025-10-30T07:20:26.949Z"},"maintainers":[{"name":"ktlee","email":"1245183029@qq.com"}],"description":"> [!CAUTION] > Vue 2 has reached EOL, and this project is no longer actively maintained.","homepage":"https://github.com/vitejs/vite-plugin-vue2-jsx#readme","repository":{"type":"git","url":"git+https://github.com/vitejs/vite-plugin-vue2-jsx.git"},"author":{"name":"MauriceWu"},"bugs":{"url":"https://github.com/vitejs/vite-plugin-vue2-jsx/issues"},"license":"MIT","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> [!CAUTION]\n> Vue 2 has reached EOL, and this project is no longer actively maintained.\n\n---\n\nProvides Vue 2 JSX & 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### useWorkerThreads\n\nType: `boolean`\n\nDefault: `true`\n\nEnable worker threads for Babel transformation to improve build performance in large projects by utilizing multiple CPU cores.\n\n### workerPoolSize\n\nType: `number`\n\nDefault: `os.cpus().length - 1`\n\nNumber of worker threads in the pool. Only applicable when `useWorkerThreads` is `true`.\n\n> 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 <div>Test</div> }})\nexport { Bar }\n\n// default export call: ok\nexport default defineComponent({ render() { return <div>Test</div> }})\n\n// default export referencing variable declaration: ok\nconst Baz = defineComponent({ render() { return <div>Test</div> }})\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","readmeFilename":"README.md","_rev":"1-19e02f33a4b7166d6a2040f3ff32c77a"}