browser-sync-webpack-plugin icon indicating copy to clipboard operation
browser-sync-webpack-plugin copied to clipboard

how to get the instance from node and trigger a reload?

Open stratboy opened this issue 3 years ago • 0 comments

Hi! I'm trying to reach the instance created in webpack config from a tasks.js small node script, and then trigger a manual reload.

This is my current code in tasks.js, which I run directly with node after executing webpack:

const webpackConfig = require('./webpack.config');
const browsersync = require('browser-sync');
const bs = browsersync.get('bs-webpack-plugin');
bs.reload(); 

bs does exists, but reload() does nothing.

How to? Is it anyway possible?

Thank you

stratboy avatar Feb 16 '22 16:02 stratboy