


The distinction is vital when trying to debug code and styles. Webpack-dev-server (WDS) is the officially maintained development server running in-memory, meaning the bundle contents aren't written out to files but stored in memory. That's where further solutions are required. It can be activated either by setting watch field true in webpack configuration or by passing the -watch to webpack-cli.Īlthough this solves the problem of recompiling your source on change, it does nothing on the frontend side and browser updates. Webpack's watch mode rebuilds the bundle on any change of the project files. It's possible to setup Browsersync to work with webpack through browser-sync-webpack-plugin, but webpack has more tricks in store in the form of a watch mode, and a development server.

They also pick up CSS changes and apply the new style without a hard refresh that loses the state of the browser. The point of either is to allow refreshing the browser automatically as you develop. The first tools on the market were LiveReload and Browsersync. Given this gets annoying fast, there's tooling to remedy the problem. When developing a frontend without any special tooling, you often end up having to refresh the browser to see changes.
