{"library":"esbuild-plugin-preserve-directives","type":"library","category":null,"description":"An esbuild plugin that ensures directives like 'use client' and 'use strict' are preserved at the top of output files. Current stable version is 0.0.11. The plugin scans source files for specified directives before bundling and reinserts them into the corresponding output chunks. It supports regex-based include/exclude patterns and works with esbuild's metafile option for improved accuracy. Updated frequently with community contributions, it is primarily used with React Server Components and Node.js ESM/CJS builds. Key differentiator: it handles directives that esbuild would otherwise strip, with minimal overhead.","language":"javascript","status":"active","version":"0.0.11","tags":["javascript","esbuild","plugin","preserve","directives","typescript"],"last_verified":"Fri May 01","install":[{"cmd":"npm install esbuild-plugin-preserve-directives","imports":["import { preserveDirectivesPlugin } from 'esbuild-plugin-preserve-directives'","import type { PreserveDirectivesPluginOptions } from 'esbuild-plugin-preserve-directives'","const { preserveDirectivesPlugin } = require('esbuild-plugin-preserve-directives')"]},{"cmd":"yarn add esbuild-plugin-preserve-directives","imports":[]},{"cmd":"pnpm add esbuild-plugin-preserve-directives","imports":[]}],"homepage":null,"github":"https://github.com/seojunhwan/esbuild-plugin-preserve-directives","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/esbuild-plugin-preserve-directives","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}