{"versions":{"1.0.0-beta.1":{"name":"babel-plugin-vue-jsx-hmr","description":"babel plugin for vue3 jsx HMR","author":{"name":"liyin"},"version":"1.0.0-beta.1","license":"MIT","homepage":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr#readme","keywords":["babel-plugin","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"}},"scripts":{"build":"tsup","watch":"tsup --watch"},"devDependencies":{"@types/babel__core":"^7.20.5","tsup":"^8.0.2","typescript":"^5.4.3"},"peerDependencies":{"@babel/core":"^7.0.0","@vue/babel-plugin-jsx":"^1.0.0"},"_id":"babel-plugin-vue-jsx-hmr@1.0.0-beta.1","gitHead":"7c0dccf881619ec394e707f148dc8fa572747213","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-psLug0NyNOJmntt0iv60/WsntqHVbTIPDO17sS6UFqyHXQ0ZDvsKZWCi1ynH7RfbCkCvikwppw2KEKrK/jk52Q==","shasum":"3c3cf0ac3c874793adb5af4937dfb88e7fe49358","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-vue-jsx-hmr/-/babel-plugin-vue-jsx-hmr-1.0.0-beta.1.tgz","fileCount":7,"unpackedSize":15072,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDlakMGu9Rn0lCCR6hfOOxn3l4TWT/7v/Qmg7XJyeTReAiAPCPFEH7ZYttmh/eIELu5O0sVNpocQShXLSZUYWNgI9g=="}],"size":3415},"_npmUser":{"name":"anonymous","email":"liyincode@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"liyincode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-vue-jsx-hmr_1.0.0-beta.1_1711772563926_0.4460922056163097"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-30T04:22:44.093Z","publish_time":1711772564093,"_source_registry_name":"default","contributors":[]},"1.0.0-beta.2":{"name":"babel-plugin-vue-jsx-hmr","description":"babel plugin for vue3 jsx HMR","author":{"name":"liyin"},"version":"1.0.0-beta.2","license":"MIT","homepage":"https://github.com/liyincode/babel-plugin-vue-jsx-hmr#readme","keywords":["babel-plugin","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","watch":"tsup --watch"},"dependencies":{"@babel/core":"^7.24.3","@vue/babel-plugin-jsx":"^1.2.2"},"devDependencies":{"@types/babel__core":"^7.20.5","tsup":"^8.0.2","typescript":"^5.4.3"},"_id":"babel-plugin-vue-jsx-hmr@1.0.0-beta.2","gitHead":"7c0dccf881619ec394e707f148dc8fa572747213","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-YuxNEq9ofVciRRLyIgvV6kqO/Ji88xYN8QPy+mYFScvWEJ0AdRZrWesdQspoTQwiOqbRiN7Fl8ZfKuhSMYG9Qw==","shasum":"3a2fe283e9f18e02171c529abbd6cb1df577b879","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-vue-jsx-hmr/-/babel-plugin-vue-jsx-hmr-1.0.0-beta.2.tgz","fileCount":7,"unpackedSize":15326,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFxx1MarCQLw3JvXW2bjigbkUA+6hOkJuV9hywTFjidwAiA1KlxZPAXkGh2MVIoliYKMN61ucjB2LX46sRMVwgqghg=="}],"size":3462},"_npmUser":{"name":"anonymous","email":"liyincode@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"liyincode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-vue-jsx-hmr_1.0.0-beta.2_1711851429259_0.37798407134719114"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-31T02:17:09.468Z","publish_time":1711851429468,"_source_registry_name":"default","contributors":[]},"1.0.0":{"name":"babel-plugin-vue-jsx-hmr","description":"babel plugin for vue3 jsx HMR","author":{"name":"liyincode"},"version":"1.0.0","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","watch":"tsup --watch"},"dependencies":{"@babel/core":"^7.24.3","@vue/babel-plugin-jsx":"^1.2.2"},"devDependencies":{"@types/babel__core":"^7.20.5","tsup":"^8.0.2","typescript":"^5.4.3"},"_id":"babel-plugin-vue-jsx-hmr@1.0.0","gitHead":"afc536a64acd169ed02306e1c502b0b2f8ab2596","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-XRq+XTD4bub6HkavELMhihvLX2++JkSBAxRXlqQK32b+Tb0S9PEqxrDSMpOEZ1iGyOaJZj9Y0uU/FzICdyL9MA==","shasum":"beada3c2f4e530a14bb2e6f504e66b335c70d5d4","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/babel-plugin-vue-jsx-hmr/-/babel-plugin-vue-jsx-hmr-1.0.0.tgz","fileCount":7,"unpackedSize":17739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGzTHvWCKe9lqyDGE6pZh10ARxXskXMINPaSgSHBMN8AiB2cXaxpXwlwVsSMszASni+zG9NqsqbDLF7C0pceUO/5w=="}],"size":4221},"_npmUser":{"name":"anonymous","email":"liyincode@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"liyincode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-vue-jsx-hmr_1.0.0_1712479786812_0.43111212442518676"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-04-07T08:49:46.968Z","publish_time":1712479786968,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"1.0.0"},"name":"babel-plugin-vue-jsx-hmr","time":{"created":"2024-03-30T07:03:01.279Z","modified":"2024-04-07T10:19:15.808Z","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"},"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))\nBabel Plugin for Vue3 JSX & TSX HMR \n\n## Usage\n\n### Webpack \n```bash\nnpm i -D babel-loader @vue/babel-plugin-jsx babel-plugin-vue-jsx-hmr\n```\n\n```js\n// webpack.config.js\n{\n    test: /\\.(?:jsx|tsx)(\\.js)?$/,\n    exclude: /node_modules/,\n    use: {\n        loader: 'babel-loader',\n        options: {\n            plugins: ['@vue/babel-plugin-jsx', 'babel-plugin-vue-jsx-hmr']\n        }\n    }\n}\n```\nIn your webpack config, be sure to have the following options:\n```js\ndevServer: {\n    liveReload: false,\n    hot: true,\n}\n```\n\n\n### Rspack\n```bash\nnpm i -D babel-loader @vue/babel-plugin-jsx babel-plugin-vue-jsx-hmr\n```\n\n```js\n// rspack.config.js\n{\n    test: /\\.(?:jsx|tsx)(\\.js)?$/,\n    exclude: /node_modules/,\n    use: {\n        loader: 'babel-loader',\n        options: {\n            plugins: ['@vue/babel-plugin-jsx', 'babel-plugin-vue-jsx-hmr']\n        }\n    }\n},\n```\n\n### Vite\n[@vitejs/plugin-vue-jsx](https://npmjs.com/package/@vitejs/plugin-vue-jsx)\n\n## HMR Detection\nThe same principle as [@vitejs/plugin-vue-jsx](https://npmjs.com/package/@vitejs/plugin-vue-jsx), so to speak, and its version of the babel plugin, whose [README](https://github.com/vitejs/vite-plugin-vue/blob/fff40f67f05763d24e8c752fa98bcd08e19f7c82/packages/plugin-vue-jsx/README.md?plain=1#L38) is referenced here.\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```","users":{}}