An esbuild plugin that writes files asynchronously in parallel before and after bundling. Version 0.0.4 is the latest stable release. It differentiates from other file-writing plugins by supporting both before and after hooks, allowing file creation at specific build lifecycle points. The plugin accepts an object with `before` and `after` properties, each mapping target paths to string content. It is lightweight with no external dependencies. Release cadence is low; the package has seen two releases. It is primarily for build tooling in Node.js environments.
npm install esbuild-plugin-write-fileNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of the plugin with before and after file writes. Uses environment variable for placeholder config.
Use absolute paths or paths relative to process.cwd(). For esbuild's outdir, ensure alignment.
Review plugin lifecycle; ensure writes are awaited if needed. Consider using onEnd for after writes.
Check file existence manually before configuring plugin if overwrite prevention needed.
Install package: npm install esbuild-plugin-write-file. If using CommonJS, use dynamic import: const writeFilePlugin = (await import('esbuild-plugin-write-file')).default;Use ESM import or dynamic import as shown in correct import.
No dependency data recorded yet.