• Version 3.5.0
  • Published
  • 16.6 kB
  • 5 dependencies
  • MIT license


npm i rollup-plugin-copy
yarn add rollup-plugin-copy
pnpm add rollup-plugin-copy


Copy files and folders using Rollup



function copy

copy: (options?: CopyOptions) => rollup.Plugin;
  • Copy files and folders using Rollup


interface CopyOptions

interface CopyOptions
extends globby.GlobbyOptions,
fs.CopyOptions {}

    property copyOnce

    readonly copyOnce?: boolean;
    • Copy items once. Useful in watch mode. false

    property copySync

    readonly copySync?: boolean;
    • Copy items synchronous. false

    property flatten

    readonly flatten?: boolean;
    • Remove the directory structure of copied files. true

    property hook

    readonly hook?: string;
    • Rollup hook the plugin should use. 'buildEnd'

    property targets

    readonly targets?: readonly Target[];
    • Array of targets to copy. []

    property verbose

    readonly verbose?: boolean;
    • Output copied items to console. false

    interface Target

    interface Target extends globby.GlobbyOptions {}

      property dest

      readonly dest: string | readonly string[];
      • One or more destinations where to copy.

      property rename

      readonly rename?:
      | string
      | ((name: string, extension: string, fullPath: string) => string);
      • Change destination file or folder name.

      property src

      readonly src: string | readonly string[];
      • Path or glob of what to copy.

      property transform

      readonly transform?: (contents: Buffer, name: string) => any;
      • Modify file contents.

      Package Files (1)

      Dependencies (5)

      Dev Dependencies (13)

      Peer Dependencies (0)

      No peer dependencies.


      To add a badge like this badgeto your package's README, use the codes available below.

      You may also use to create a custom badge linking to

      • Markdown
      • HTML
        <a href=""><img src="" alt=""></a>