Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 552 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 552 Bytes

Bun Copy Plugin

No nonsense copy files plugin on bun build.

Github Repo

Setup

bun i bun-copy-plugin

Use

import copy from 'bun-copy-plugin'

Bun.build({
  entrypoints: ['src/index.ts'],
  outdir: 'dist',
  plugins: [
    copy('static/index.html', 'dist/index.html'), // file 'static/index.html' -> 'dist/index.html'
    copy('static/', 'dist/static'), // folder 'static' -> 'dist/static'
    copy('static/', 'dist'), // contents of 'static' -> 'dist/*'
  ],
})