Preparing for system design interviews?  Try bugzed.com →

rollup-plugin-preserve-directives

JSON →
library 0.4.0 ·javascript
verified Jun 18, 2026

A Rollup plugin that preserves file-level directives (e.g., 'use client', 'use server') when using preserveModules: true. Version 0.4.0 is the current stable release, with a simple API and minimal configuration. Unlike bundling, where directives are meaningless per file, this plugin ensures each preserved module retains its directives, enabling patterns like React Server Components without separate entrypoints. Still considered early-stage (largely untested) but functional. Filters via include/exclude globs. Warning suppression options exist. Supports Rollup 2–4. Ships TypeScript types.

total hits 14
actors 5 distinct systems
last hit 16d ago AhrefsBot
GPTBot
4
ClaudeBot
2
Script
1
Search engines
3

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France