{"_id":"babel-plugin-vue-jsx-hmr","_rev":"5-ec3b002a3ff07b033d4ab62468288257","name":"babel-plugin-vue-jsx-hmr","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0-beta.1":{"name":"babel-plugin-vue-jsx-hmr","version":"1.0.0-beta.1","keywords":["babel-plugin","vue3","jsx","hmr"],"author":{"name":"liyin"},"license":"MIT","_id":"babel-plugin-vue-jsx-hmr@1.0.0-beta.1","maintainers":[{"name":"liyincode","email":"liyincode@gmail.com"}],"homepage":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr#readme","bugs":{"url":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr/issues"},"dist":{"shasum":"3c3cf0ac3c874793adb5af4937dfb88e7fe49358","tarball":"https://registry.npmjs.org/babel-plugin-vue-jsx-hmr/-/babel-plugin-vue-jsx-hmr-1.0.0-beta.1.tgz","fileCount":7,"integrity":"sha512-psLug0NyNOJmntt0iv60/WsntqHVbTIPDO17sS6UFqyHXQ0ZDvsKZWCi1ynH7RfbCkCvikwppw2KEKrK/jk52Q==","signatures":[{"sig":"MEQCIDlakMGu9Rn0lCCR6hfOOxn3l4TWT/7v/Qmg7XJyeTReAiAPCPFEH7ZYttmh/eIELu5O0sVNpocQShXLSZUYWNgI9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15072},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"7c0dccf881619ec394e707f148dc8fa572747213","scripts":{"build":"tsup","watch":"tsup --watch"},"_npmUser":{"name":"liyincode","email":"liyincode@gmail.com"},"repository":{"url":"git+https://github.com/liyincode/babel-plugin-vue-jsx-hmr.git","type":"git"},"_npmVersion":"10.2.4","description":"babel plugin for vue3 jsx HMR","directories":{},"_nodeVersion":"20.11.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","typescript":"^5.4.3","@types/babel__core":"^7.20.5"},"peerDependencies":{"@babel/core":"^7.0.0","@vue/babel-plugin-jsx":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-vue-jsx-hmr_1.0.0-beta.1_1711772563926_0.4460922056163097","host":"s3://npm-registry-packages"}},"1.0.0-beta.2":{"name":"babel-plugin-vue-jsx-hmr","version":"1.0.0-beta.2","keywords":["babel-plugin","vue3","jsx","hmr"],"author":{"name":"liyin"},"license":"MIT","_id":"babel-plugin-vue-jsx-hmr@1.0.0-beta.2","maintainers":[{"name":"liyincode","email":"liyincode@gmail.com"}],"homepage":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr#readme","bugs":{"url":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr/issues"},"dist":{"shasum":"3a2fe283e9f18e02171c529abbd6cb1df577b879","tarball":"https://registry.npmjs.org/babel-plugin-vue-jsx-hmr/-/babel-plugin-vue-jsx-hmr-1.0.0-beta.2.tgz","fileCount":7,"integrity":"sha512-YuxNEq9ofVciRRLyIgvV6kqO/Ji88xYN8QPy+mYFScvWEJ0AdRZrWesdQspoTQwiOqbRiN7Fl8ZfKuhSMYG9Qw==","signatures":[{"sig":"MEQCIFxx1MarCQLw3JvXW2bjigbkUA+6hOkJuV9hywTFjidwAiA1KlxZPAXkGh2MVIoliYKMN61ucjB2LX46sRMVwgqghg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15326},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"7c0dccf881619ec394e707f148dc8fa572747213","scripts":{"build":"tsup","watch":"tsup --watch"},"_npmUser":{"name":"liyincode","email":"liyincode@gmail.com"},"repository":{"url":"git+https://github.com/liyincode/babel-plugin-vue-jsx-hmr.git","type":"git"},"_npmVersion":"10.2.4","description":"babel plugin for vue3 jsx HMR","directories":{},"_nodeVersion":"20.11.0","dependencies":{"@babel/core":"^7.24.3","@vue/babel-plugin-jsx":"^1.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","typescript":"^5.4.3","@types/babel__core":"^7.20.5"},"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-vue-jsx-hmr_1.0.0-beta.2_1711851429259_0.37798407134719114","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"babel-plugin-vue-jsx-hmr","version":"1.0.0","keywords":["babel","plugin","webpack","rspack","rsbuild","vue3","jsx","hmr"],"author":{"name":"liyincode"},"license":"MIT","_id":"babel-plugin-vue-jsx-hmr@1.0.0","maintainers":[{"name":"liyincode","email":"liyincode@gmail.com"}],"homepage":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr#readme","bugs":{"url":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr/issues"},"dist":{"shasum":"beada3c2f4e530a14bb2e6f504e66b335c70d5d4","tarball":"https://registry.npmjs.org/babel-plugin-vue-jsx-hmr/-/babel-plugin-vue-jsx-hmr-1.0.0.tgz","fileCount":7,"integrity":"sha512-XRq+XTD4bub6HkavELMhihvLX2++JkSBAxRXlqQK32b+Tb0S9PEqxrDSMpOEZ1iGyOaJZj9Y0uU/FzICdyL9MA==","signatures":[{"sig":"MEQCIAGzTHvWCKe9lqyDGE6pZh10ARxXskXMINPaSgSHBMN8AiB2cXaxpXwlwVsSMszASni+zG9NqsqbDLF7C0pceUO/5w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17739},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"afc536a64acd169ed02306e1c502b0b2f8ab2596","scripts":{"build":"tsup","watch":"tsup --watch"},"_npmUser":{"name":"liyincode","email":"liyincode@gmail.com"},"repository":{"url":"git+https://github.com/liyincode/babel-plugin-vue-jsx-hmr.git","type":"git"},"_npmVersion":"10.2.4","description":"babel plugin for vue3 jsx HMR","directories":{},"_nodeVersion":"20.11.0","dependencies":{"@babel/core":"^7.24.3","@vue/babel-plugin-jsx":"^1.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","typescript":"^5.4.3","@types/babel__core":"^7.20.5"},"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-vue-jsx-hmr_1.0.0_1712479786812_0.43111212442518676","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"babel-plugin-vue-jsx-hmr","version":"1.0.1","keywords":["babel","plugin","webpack","rspack","rsbuild","vue3","jsx","hmr"],"author":{"name":"liyincode"},"license":"MIT","_id":"babel-plugin-vue-jsx-hmr@1.0.1","maintainers":[{"name":"liyincode","email":"liyincode@gmail.com"}],"homepage":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr#readme","bugs":{"url":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr/issues"},"dist":{"shasum":"cf25a88fe5de3ee2ff4dcaa2246e49a60e668a43","tarball":"https://registry.npmjs.org/babel-plugin-vue-jsx-hmr/-/babel-plugin-vue-jsx-hmr-1.0.1.tgz","fileCount":7,"integrity":"sha512-y8stNmJTgN5IPfSY6zuryMPjZrmDtL2HnIsqgzniSxqEr4BbBXQHb2RNPPGAqtRM/vjaSEz+jX7vmA9HN8Xq2A==","signatures":[{"sig":"MEYCIQDo9c1GAZ50p7CBVmmvkFjIhA0rngUKm5+tSjY6yLzD4AIhAIljmcXI1rN6mE9mThB83v1kKl7PycIUVW+NhHoH5+/h","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18073},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"6076923d6920cd6d0253ccb83a893415d5b388b9","scripts":{"test":"npm run build && node --test","build":"tsup","watch":"tsup --watch"},"_npmUser":{"name":"liyincode","email":"liyincode@gmail.com"},"repository":{"url":"git+https://github.com/liyincode/babel-plugin-vue-jsx-hmr.git","type":"git"},"_npmVersion":"11.6.2","description":"babel plugin for vue3 jsx HMR","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@babel/core":"^7.24.3","@vue/babel-plugin-jsx":"^1.2.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.2","webpack":"^5.109.2","typescript":"^5.4.3","@types/node":"^20.12.7","@rspack/core":"^2.1.8","@types/babel__core":"^7.20.5"},"_npmOperationalInternal":{"tmp":"tmp/babel-plugin-vue-jsx-hmr_1.0.1_1786421145977_0.9949580910131814","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"babel-plugin-vue-jsx-hmr","description":"babel plugin for vue3 jsx HMR","author":{"name":"liyincode"},"version":"1.0.2","license":"MIT","homepage":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr#readme","keywords":["babel","plugin","webpack","rspack","rsbuild","vue3","jsx","hmr"],"repository":{"type":"git","url":"git+https://github.com/liyincode/babel-plugin-vue-jsx-hmr.git"},"bugs":{"url":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr/issues"},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs","types":"./dist/index.d.ts"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","test":"npm run build && node --test","watch":"tsup --watch"},"dependencies":{"@babel/core":"^7.24.3","@vue/babel-plugin-jsx":"^1.2.2"},"devDependencies":{"@rspack/core":"^2.1.8","@types/babel__core":"^7.20.5","@types/node":"^20.12.7","tsup":"^8.0.2","typescript":"^5.4.3","webpack":"^5.109.2"},"gitHead":"914831909b7c680aec758d53d27c40d7b85891d0","_id":"babel-plugin-vue-jsx-hmr@1.0.2","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-TSmcY8wTTUiH0lU/prMKqghV0iMNNzyKBPIgybMlngQ05GeWoA9VbNRhmp3mZFAXjYVsnXyzBJw64kKx4jkpUw==","shasum":"7f114fab25089c26fe78d4fcba3f374d7a66b2f7","tarball":"https://registry.npmjs.org/babel-plugin-vue-jsx-hmr/-/babel-plugin-vue-jsx-hmr-1.0.2.tgz","fileCount":7,"unpackedSize":17750,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHymZPPH5ZUbtFYdcKRJhuaMecXmOmn8X9ZqgUdbksTaAiEAlTE/J9nOvIIOYg05YVkjPFRxGI+NvUxS/DaUazlyKFQ="}]},"_npmUser":{"name":"liyincode","email":"liyincode@gmail.com"},"directories":{},"maintainers":[{"name":"liyincode","email":"liyincode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/babel-plugin-vue-jsx-hmr_1.0.2_1786432029493_0.782558550767865"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-30T04:22:43.925Z","modified":"2026-08-11T07:07:09.811Z","1.0.0-beta.1":"2024-03-30T04:22:44.093Z","1.0.0-beta.2":"2024-03-31T02:17:09.468Z","1.0.0":"2024-04-07T08:49:46.968Z","1.0.1":"2026-08-11T04:05:46.146Z","1.0.2":"2026-08-11T07:07:09.674Z"},"bugs":{"url":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr/issues"},"author":{"name":"liyincode"},"license":"MIT","homepage":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr#readme","keywords":["babel","plugin","webpack","rspack","rsbuild","vue3","jsx","hmr"],"repository":{"type":"git","url":"git+https://github.com/liyincode/babel-plugin-vue-jsx-hmr.git"},"description":"babel plugin for vue3 jsx HMR","maintainers":[{"name":"liyincode","email":"liyincode@gmail.com"}],"readme":"# babel-plugin-vue-jsx-hmr [![npm](https://img.shields.io/npm/v/babel-plugin-vue-jsx-hmr)](https://www.npmjs.com/package/babel-plugin-vue-jsx-hmr)\n\nA Babel plugin that adds Vue 3 JSX and TSX HMR support to Webpack and Rspack.\n\n## Usage\n\n### Webpack and Rspack\n\n```bash\nnpm i -D babel-loader @babel/core @babel/preset-typescript \\\n  @vue/babel-plugin-jsx babel-plugin-vue-jsx-hmr\n```\n\n```js\n// webpack.config.cjs or rspack.config.cjs\nmodule.exports = {\n    module: {\n        rules: [\n            {\n                test: /\\.[jt]sx?$/,\n                exclude: /node_modules/,\n                use: {\n                    loader: 'babel-loader',\n                    options: {\n                        presets: ['@babel/preset-typescript'],\n                        plugins: [\n                            '@vue/babel-plugin-jsx',\n                            'babel-plugin-vue-jsx-hmr',\n                        ],\n                    },\n                },\n            },\n        ],\n    },\n    resolve: {\n        extensions: ['.tsx', '.ts', '.jsx', '...'],\n    },\n    devServer: {\n        hot: true,\n    },\n}\n```\n\nThe plugin can remain enabled in production; Webpack and Rspack remove its\ninjected code when HMR is disabled.\n\n### Vite\n\nUse the official\n[`@vitejs/plugin-vue-jsx`](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue-jsx)\n\n## HMR detection\n\nHMR injection requires both conditions:\n\n- The component must be exported.\n- The component must be declared by calling `defineComponent` in a root-level\n  variable 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### Unsupported patterns\n\n```jsx\n// not using `defineComponent` call\nexport const Bar = { ... }\n\n// not exported\nconst Foo = defineComponent(...)\n```\n","readmeFilename":"README.md"}