This example demonstrates how to use webpack-dev-server.
npx webpack serve --openTo run your app using an alternative config, use:
npx webpack serve --open --config alternative.config.js- The script should open
http://localhost:8080/in your default browser. - You should see the text on the page itself change to read
Success!. - In
app.jsuncomment the code that results in an error and save. - This error should be visible in the console/terminal and in the browser's devtools.
- In
app.jsuncomment the code that results in a warning. This warning should be visible in the console/terminal and in the browser's devtools. - Try changing something in
style.less. The browser should refresh, and the change should be visible in the app.