Skip to content

esbuild plugin for asynchronously copying files in parallel

License

Notifications You must be signed in to change notification settings

ozanozbek/esbuild-plugin-copy-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esbuild-plugin-copy-file

This esbuild plugin copies files (asynchronously and in parallel) before and after bundling.

Installation

npm install esbuild-plugin-copy-file

Usage

import esbuild from 'esbuild';
import copyFilePlugin from 'esbuild-plugin-copy-file';

esbuild.build({
  // ...
  plugins: [copyFilePlugin({
    before: { // copy before bundling
      './assets/favicon.png': './media/images/favicon.png'
    },
    after: { // copy after bundling
      './logs/build-report.json': './dist/report.json'
    }
  })]
});

Options

before: {String targetPath: String sourcePath, ...}

An object with targetPath: sourcePath entries. Files are copied before bundling.

after: {String targetPath: String sourcePath, ...}

An object with targetPath: sourcePath entries. Files are copied after bundling.

About

esbuild plugin for asynchronously copying files in parallel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published