![How to run webpack-dev-server](https://kumkoniak.com/61.jpg)
npm install -save-dev webpack-dev-serverĬreate a script entry in package. Start by installing Webpack Dev Server as usual. When I go to localhost:9000 the page wont load. The answer is to run two servers: both Webpack Dev Server and your existing Stack. /app RUN yarn build EXPOSE 9000 CMD 'yarn', 'production' The docker image gets created, and can be ran in a container.
![how to run webpack-dev-server how to run webpack-dev-server](https://s3.amazonaws.com/media-p.slid.es/uploads/914768/images/5916869/pasted-from-clipboard.png)
Create index.html file and public directory Setup package. Now that you know Webpack dev server may help you quickly develop a React application, let’s break down the steps. You want the hot-reloading function that you get with. However, it needs to live inside an existing framework, such as Symfony for PHP. Run the Webpack Dev Server So let’s go back over to the terminal, so I can say npm run serve, you can see that the same Webpack build steps from before are being performed, and this will tell me that the project is running at localhost:3000.
![how to run webpack-dev-server how to run webpack-dev-server](https://inotgo.com/imagesLocal/202112/25/202112252014557738_2.jpg)
You want the hot-reloading function that you get with Webpack Dev Server, but you also need the content to be served from your LAMP stack because it creates the HTML wrapper page. Webpack dev server should ONLY be used for development. You are making an awesome new JavaScript-based app in React. However, it needs to live inside an existing framework, such as Symfony for PHP. You are making an awesome new JavaScript-based app in React.
![How to run webpack-dev-server](https://kumkoniak.com/61.jpg)