

#Yarn install webpack dev server code
webpack-dev-server : A HTML server that will load our code and. Source code files used by webpack-dev-server is rendered in watch mode at user specified directory through override.

yarn add webpack-dev-server -dev Then open your package. Webpack dev server is also a separate package that needs to get install via NPM. npm install webpack webpack-cli webpack-dev-server webpack-merge ts-loader -save-dev. This will create a development server for us and monitor our files for any changes during development. The Node.js server listens to when files were changed, and triggers events to react accordingly. It is inefficient to Ctrl-C your build script & server just to install a dependency you didn't know you needed until now.

It uses a library called SockJS to emulate a web socket. Speed up development by automatically installing & saving dependencies with Webpack. Source code files used by webpack-dev-server is rendered in watch mode at user specified directory through override create-react-app webpack configs without ejecting. The downside of using something like Webpack - or any tool that builds your assets - is that every time you make a change, you have to re-run webpack. Under the hood, Webpack dev server is a mini Node.js Express server.
