rollup-plugin-preserve-use-client
JSON →A Rollup plugin to preserve the 'use client' directive in React 18 components during bundling, ensuring proper separation between server and client components. Current stable version is 3.0.1, released under MIT, with ESM and CJS support and TypeScript type definitions. Unlike alternatives like rollup-plugin-preserve-directives, this plugin does not require 'preserveModules: true', avoiding conflicts with CSS module imports. The plugin uses Rollup's moduleParsed hook (v3.0.0+) and targets Rollup ^4.0.0 as a peer dependency. It solves a specific pain point for library authors distributing npm packages with both server and client components.
Traffic · last 30 days stale · no recent hits
total hits 11
actors 5 distinct systems
last hit 25d ago AhrefsBot
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇬🇧 United Kingdom