{"_id":"rollup-plugin-preserve-use-client","_rev":"4-bd3adfa6073ce3711638d72aa20511af","name":"rollup-plugin-preserve-use-client","dist-tags":{"latest":"3.0.1"},"versions":{"1.0.0":{"name":"rollup-plugin-preserve-use-client","version":"1.0.0","keywords":["rollup","plugin","react","use client","server components","client components"],"author":{"name":"soobing","email":"qls0147@naver.com"},"license":"MIT","_id":"rollup-plugin-preserve-use-client@1.0.0","maintainers":[{"name":"soobing","email":"qls0147@naver.com"}],"dist":{"shasum":"e464dbf3649945442d3b5faeda230c0bc1771895","tarball":"https://registry.npmjs.org/rollup-plugin-preserve-use-client/-/rollup-plugin-preserve-use-client-1.0.0.tgz","fileCount":8,"integrity":"sha512-bWJpeMYykBSsNVZNFELxwO5J5mzPwG+8E8y4pHN5keRWZgLBH40BgZmtxQgwtHbH2B6iGpgKKB2Xt6GI5wjcgQ==","signatures":[{"sig":"MEUCIQDIFmyXa7rYwoUY1ebNV34PoUPUhmsxZCen2FdxNScZKwIgHa7RojrXbUYl6lN5PdhZzg9jABVAeL5g/msff/j6ERY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7201},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"daf4ecfc055f0c9bdccfa69f5fed1382447589d0","scripts":{"build":"tsup src/index.ts --dts --format cjs,esm","check":"tsc","watch":"npm run build --watch"},"_npmUser":{"name":"soobing","email":"qls0147@naver.com"},"_npmVersion":"10.2.3","description":"A Rollup plugin to preserve 'use client' directives for React 18 components.","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","rollup":"^4.24.4","typescript":"^5.6.3"},"peerDependencies":{"rollup":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rollup-plugin-preserve-use-client_1.0.0_1731163214708_0.6118837890082145","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"rollup-plugin-preserve-use-client","version":"1.0.1","keywords":["rollup","plugin","react","use client","server components","client components"],"author":{"name":"soobing","email":"qls0147@naver.com"},"license":"MIT","_id":"rollup-plugin-preserve-use-client@1.0.1","maintainers":[{"name":"soobing","email":"qls0147@naver.com"}],"homepage":"https://github.com/soobing/rollup-plugin-preserve-use-client#readme","bugs":{"url":"https://github.com/soobing/rollup-plugin-preserve-use-client/issues"},"dist":{"shasum":"16c8796c7a834a1dbe8298495d92dc70817a5a1f","tarball":"https://registry.npmjs.org/rollup-plugin-preserve-use-client/-/rollup-plugin-preserve-use-client-1.0.1.tgz","fileCount":8,"integrity":"sha512-DMVSnWSL8Ou5kK9u5a494/ufKaMLVt5W+31uDRYUS/KiwdboQSBW0DCBUAPJaso7bfKqZW2LlpnW5kkeFRkwKQ==","signatures":[{"sig":"MEUCIH9MdOCIZQ6/1EXt+FB+nlvLWFw+/+0Uu3bz/8F4zHSKAiEAjOTHm5zgpRWozEbBFaxUk7+sfy6V5GqxhFvnlP444r0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7600},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"ba34794bbb1e383d8ef35f2fc5e403efb2702b98","scripts":{"build":"tsup src/index.ts --dts --format cjs,esm","check":"tsc","watch":"npm run build --watch"},"_npmUser":{"name":"soobing","email":"qls0147@naver.com"},"repository":{"url":"git+https://github.com/soobing/rollup-plugin-preserve-use-client.git","type":"git"},"_npmVersion":"10.2.3","description":"A Rollup plugin to preserve 'use client' directives for React 18 components.","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","rollup":"^4.24.4","typescript":"^5.6.3"},"peerDependencies":{"rollup":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rollup-plugin-preserve-use-client_1.0.1_1731164235146_0.47747216161606665","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"rollup-plugin-preserve-use-client","version":"2.0.0","keywords":["rollup","plugin","react","use client","server components","client components"],"author":{"name":"soobing","email":"qls0147@naver.com"},"license":"MIT","_id":"rollup-plugin-preserve-use-client@2.0.0","maintainers":[{"name":"soobing","email":"qls0147@naver.com"}],"homepage":"https://github.com/soobing/rollup-plugin-preserve-use-client#readme","bugs":{"url":"https://github.com/soobing/rollup-plugin-preserve-use-client/issues"},"dist":{"shasum":"07fb821102d9eee6111b71db2a13579f96cf2951","tarball":"https://registry.npmjs.org/rollup-plugin-preserve-use-client/-/rollup-plugin-preserve-use-client-2.0.0.tgz","fileCount":8,"integrity":"sha512-xm+YmNohAwkhbWqg/v6kL4F6+mKhX6SjHuwgQhTMyAqrd2JEkmk0jOlO1EtPt4P3ucXmHG3ni96tWVJtIB8C8A==","signatures":[{"sig":"MEUCIQCkdUyd5EQJQxn7remXFZgoxHmB/Z0htvMrJ7wGpTefzwIgeoT01P0dHi1I+TapopJACiSkFFeE0Y8g9VxcCsqose8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7600},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"410ec467230145cfd9bf5de8b9c61d69278b9003","scripts":{"build":"tsup src/index.ts --dts --format cjs,esm","check":"tsc","watch":"npm run build --watch"},"_npmUser":{"name":"soobing","email":"qls0147@naver.com"},"repository":{"url":"git+https://github.com/soobing/rollup-plugin-preserve-use-client.git","type":"git"},"_npmVersion":"10.2.3","description":"A Rollup plugin to preserve 'use client' directives for React 18 components.","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","rollup":"^4.24.4","typescript":"^5.6.3"},"peerDependencies":{"rollup":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rollup-plugin-preserve-use-client_2.0.0_1731164382182_0.8496030411744999","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"rollup-plugin-preserve-use-client","version":"3.0.0","keywords":["rollup","plugin","react","use client","server components","client components"],"author":{"name":"soobing","email":"qls0147@naver.com"},"license":"MIT","_id":"rollup-plugin-preserve-use-client@3.0.0","maintainers":[{"name":"soobing","email":"qls0147@naver.com"}],"homepage":"https://github.com/soobing/rollup-plugin-preserve-use-client#readme","bugs":{"url":"https://github.com/soobing/rollup-plugin-preserve-use-client/issues"},"dist":{"shasum":"ee212e551e53501a72645eaeab48a082f885b574","tarball":"https://registry.npmjs.org/rollup-plugin-preserve-use-client/-/rollup-plugin-preserve-use-client-3.0.0.tgz","fileCount":8,"integrity":"sha512-syycfuQnLVxzGGFxApBnLPlPTSn2nqfxpOZTOEPQ1ZgbvdCfMtVGfaKjHrMudd52VDaE3bX/Mbik35qR9xMUvg==","signatures":[{"sig":"MEUCIA8X78y4V188Xow7aHa68gpiwehS3+28gDnWLS845TG6AiEAoXNPS+VI/v3nfmaG1EVqEY86KP2p470lHVmcGgxD8eM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7710},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"gitHead":"9d67f5a9a3d4c6bb8fa647d9e0d241b11e54da85","scripts":{"build":"tsup src/index.ts --dts --format cjs,esm","check":"tsc","watch":"npm run build --watch"},"_npmUser":{"name":"soobing","email":"qls0147@naver.com"},"repository":{"url":"git+https://github.com/soobing/rollup-plugin-preserve-use-client.git","type":"git"},"_npmVersion":"10.2.3","description":"A Rollup plugin to preserve 'use client' directives for React 18 components.","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","rollup":"^4.24.4","typescript":"^5.6.3"},"peerDependencies":{"rollup":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rollup-plugin-preserve-use-client_3.0.0_1731197741643_0.572685362741385","host":"s3://npm-registry-packages"}},"3.0.1":{"type":"module","name":"rollup-plugin-preserve-use-client","version":"3.0.1","description":"A Rollup plugin to preserve 'use client' directives for React 18 components.","types":"dist/index.d.ts","main":"dist/index.cjs","module":"dist/index.js","scripts":{"check":"tsc","build":"tsup src/index.ts --dts --format cjs,esm","watch":"npm run build --watch"},"keywords":["rollup-plugin","rollup","plugin","react","use client","server components","client components"],"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"repository":{"type":"git","url":"git+https://github.com/soobing/rollup-plugin-preserve-use-client.git"},"author":{"name":"soobing","email":"qls0147@naver.com"},"peerDependencies":{"rollup":"^4.0.0"},"license":"MIT","devDependencies":{"rollup":"^4.24.4","tsup":"^8.3.5","typescript":"^5.6.3"},"_id":"rollup-plugin-preserve-use-client@3.0.1","gitHead":"3196a7d6db5bb92bb33e8ee0e553e3c9507a3179","bugs":{"url":"https://github.com/soobing/rollup-plugin-preserve-use-client/issues"},"homepage":"https://github.com/soobing/rollup-plugin-preserve-use-client#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-4WKtGnQsgeCzT/PnA82V4knXVTKxNrxJFcPVa1Kero2XaLs1yazGSCUwxv6NzVmeNeURqE+A5wLbI+zlPKVgMg==","shasum":"653a4a99fe04e3a42339105b29c3fcfc061f4436","tarball":"https://registry.npmjs.org/rollup-plugin-preserve-use-client/-/rollup-plugin-preserve-use-client-3.0.1.tgz","fileCount":8,"unpackedSize":7731,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDXqnNEjH85K2/fdOqEeupotXcKmea9dzR9BqWwGlanwIhAPT3RdMicFxRz8hWvpYFj5/gKpg3xb2Ysfty9HOG7igZ"}]},"_npmUser":{"name":"soobing","email":"qls0147@naver.com"},"directories":{},"maintainers":[{"name":"soobing","email":"qls0147@naver.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-preserve-use-client_3.0.1_1731199795402_0.789494162138475"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-09T14:40:14.707Z","modified":"2024-11-10T00:49:55.740Z","1.0.0":"2024-11-09T14:40:14.897Z","1.0.1":"2024-11-09T14:57:15.325Z","2.0.0":"2024-11-09T14:59:42.422Z","3.0.0":"2024-11-10T00:15:41.825Z","3.0.1":"2024-11-10T00:49:55.580Z"},"bugs":{"url":"https://github.com/soobing/rollup-plugin-preserve-use-client/issues"},"author":{"name":"soobing","email":"qls0147@naver.com"},"license":"MIT","homepage":"https://github.com/soobing/rollup-plugin-preserve-use-client#readme","keywords":["rollup-plugin","rollup","plugin","react","use client","server components","client components"],"repository":{"type":"git","url":"git+https://github.com/soobing/rollup-plugin-preserve-use-client.git"},"description":"A Rollup plugin to preserve 'use client' directives for React 18 components.","maintainers":[{"name":"soobing","email":"qls0147@naver.com"}],"readme":"# rollup-plugin-preserve-use-client\n\n## Introduction\n`rollup-plugin-preserve-use-client` is a Rollup plugin designed to preserve the `'use client'` directive when bundling React 18 components. This plugin ensures that React 18 server and client components are clearly distinguished by maintaining the `'use client'` directive where needed.\n\n### Background\nThis plugin was created to solve an issue I faced while developing an npm module that provides both server and client component UIs using React 18. Rollup, by default, removes all directives, which led to the removal of the `'use client'` directive from my components. Initially, I tried using `rollup-plugin-preserve-directives` to solve this, but that plugin required setting `preserveModules: true` in Vite's output configuration. This caused conflicts with CSS injection plugins, breaking all `module.css` imports. Thus, I created this plugin to preserve the `'use client'` directive without needing to enable `preserveModules`, ensuring better compatibility with existing CSS solutions.\n\n## Installation\n```bash\nnpm install rollup-plugin-preserve-use-client --save-dev\n```\n## Usage\n\nAdd the plugin to your Rollup configuration file:\n```ts\nimport preserveUseClientDirective from 'rollup-plugin-preserve-use-client';\n\nexport default {\n  plugins: [preserveUseClientDirective()],\n};\n```\n## Key Features\n\n**No Need for `preserveModules: true`** Unlike other plugins, `rollup-plugin-preserve-use-client` does not require you to set `preserveModules: true`. This helps avoid issues with CSS module imports and ensures seamless bundling.\n\nReact 18 Compatibility: Ensures that `'use client'` directives are maintained, making it easier to differentiate between server and client components in your React 18 projects.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a bug report or feature request via GitHub issues.\n\n## License\n\nReleased under the MIT License.","readmeFilename":"README.md"}