Installation
npm
npm i -D rollup-plugin-watcher-amstramgram
Manually
Download the plugin in a rollup-plugin-watcher-amstramgram folder located at the root of your project.
Dependencies
If you have chosen the manual way, install also fast-glob.
npm i -D fast-glob
Usage
...
//import rollup-plugin-watcher-amstramgram from the folder where you downloaded it :
import watcher from './rollup-plugin-watcher-amstramgram/esm/index.mjs'
//Or if you have installed it from npm :
//import watcher from 'rollup-plugin-watcher-amstramgram'
...
export default = {
input: 'src/js/index.js',
output: {
file: 'dist/js/index.js',
format: ...
},
plugins: [
...
watcher( {
//Watch the dev/assets folder and all it subdirectories
files: 'dev/assets',
}),
...
]
}