Va1 / browser-sync-webpack-plugin

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

enable only on certian ENV #81

Closed theskillwithin closed 4 years ago

theskillwithin commented 5 years ago

I want to only do browsersync when i do yarn start-bs

how do i do this in webpack config?

malinbranduse commented 5 years ago

@theskillwithin Hello! using the config from the documentation, you can simply add a new line to scripts in package.json:

"scripts": {
  "start-bs": "cross-env NODE_ENV=development webpack --watch",
  "prod": "cross-env NODE_ENV=production webpack"
},

Let me know if it works for you

Va1 commented 4 years ago

the above comment is a valid solution. for the absence of further discussion, i close this. thank you, guys