craigstroman / webpack-devserver-config

An example of using WebPack with WebPack DevServer, hot reloading, and React.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebPack DevServer Config With React

A simple WebPack config with devServer enabled, hot reloading, and using React.

Development

  • npm start to start dev server.
  • Open browser to http://localhost:3000/
  • Browser will reload when changes to files within ./src/ are made.

Production

  • npm run build to build production version of app.
  • Add the script tag to ./public/index.html with the path to the new production JavaScript.
  • npm run prod to start production server.
  • Open browser to http://localhost:8080 to view page.

Based on https://medium.com/@cstroman/setting-up-devserver-with-hot-reloading-using-webpack-4-and-react-8a78d96ff09c

About

An example of using WebPack with WebPack DevServer, hot reloading, and React.


Languages

Language:JavaScript 85.9%Language:HTML 14.1%