Va1 / browser-sync-webpack-plugin

Easily use BrowserSync in your Webpack project.
MIT License
369 stars 40 forks source link

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

Open stratboy opened 2 years ago

stratboy commented 2 years ago

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