一覧へ戻る
rixo/rollup-plugin-copy-watch(新しいタブで開きます)
主要言語: JavaScript
A fork of rollup-plugin-copy that can watch other directories
- star 数
- 11
- watcher 数
- 1
- fork 数
- 2
- issue 数
- 10
- 最終更新
- 2023/01/05
主要言語: JavaScript
A fork of rollup-plugin-copy that can watch other directories
A fork of rollup-plugin-copy with an additional watch to watch other sources than just Rollup's bundle content (e.g. your static assets directory).
Copy files and folders, with glob support.
# yarn yarn add rollup-plugin-copy-watch -D # npm npm install rollup-plugin-copy-watch -D
// rollup.config.js import copy from 'rollup-plugin-copy-watch' export default { input: 'src/index.js', output: { file: 'dist/app.js', format: 'cjs' }, plugins: [ copy({ // the watch option is passed directly to Chokidar, so it can be a file, // dir, array or glob(s) watch: 'static', targets: [ { src: 'src/index.html', dest: 'dist/public' }, { src: ['assets/fonts/arial.woff', 'assets/fonts/arial.woff2'], dest: 'dist/public/fonts' }, { src: 'assets/images/**/*', dest: 'dist/public/images' } ] }) ] }
The configuration is exactly the same as rollup-plugin-copy, with just one option added. Refer to the original plugin for all other options.
Type: string|string[] Default: null
Paths to files, dirs to be watched recursively, or glob patterns.
This is passed directly to chokidar.watch.
rollup-plugin-copy: Cédric Meuter
MIT