This modules made for deno-rollup Next-generation ES module bundler for Deno ported from Rollup.
deno-rollup-plugin-livereload is a Deno rebuilt/port from rollup-plugin-livereload. Automatically reload your browser when the filesystem changes.
import livereload from 'https://deno.land/x/drollup_plugin_livereload@0.1.0/mod.ts'
// rollup.config.js
export default {
entry: 'entry.js',
dest: 'bundle.js',
plugins: [livereload()],
}
To make it a real dev-server, combine this plugin with deno-rollup-plugin-serve.
// rollup.config.js
import serve from 'https://deno.land/x/drollup_plugin_serve/mod.ts'
import livereload from 'https://deno.land/x/drollup_plugin_livereload/mod.ts'
export default {
entry: 'entry.js',
dest: 'bundle.js',
plugins: [
serve(), // index.html should be in root of project
livereload(),
],
}
By default, it watches the current directory. If you also have css output, pass the folder to which the build files are written.
livereload('dist')
// --- OR ---
livereload({
base: ['dist'],
verbose: false, // Disable console output
// other livereload options
exclude: ['*.ts']
})
Options are always passed to new LiveReload()
Please see CHANGELOG for more information what has changed recently.
Contributions and feedback are very welcome.
The MIT License (MIT). Please see License File for more information.