Skip to content
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.

Latest commit

 

History

History
47 lines (30 loc) · 1.19 KB

File metadata and controls

47 lines (30 loc) · 1.19 KB

Minimal Webpack 2 Setup with Tree Shaking and Hot Module Replacement

Started from https://www.robinwieruch.de/minimal-react-webpack-babel-setup/ and added:

Prerequisites

node and yarn installed.

Setup

  1. Clone the repo:
$> git clone https://github.com/cassilup/react-hot-module-replace-tree-shake
  1. Install dependencies:
$> yarn

Commands

Development

$> yarn start

And navigate to http://localhost:8080 to see it in action.

Any changes to the JS(X) code will be Hot-Module-Replaced into the page (meaning: without a full refresh).

Production

$> yarn dist

...and you now have the dist/ folder holding both index.html as well as the app packaged in bundle.js.

Enjoy. :)