sahat / megaboilerplate

Handcrafted starter projects, optimized for simplicity and ease of use.
MIT License
3.83k stars 257 forks source link

Reordered express middleware to resolve server side render issue when… #188

Open choch-o opened 7 years ago

choch-o commented 7 years ago

… using webpack + react + express

Original version had an issue with the following steps: 1) Run npm start at least once. 2) Make some changes in any React component files. 3) Run npm start again. 4) Open it in browser. 5) You'll see it loads changed code initially but refreshes back to code generated in Step 1

This issue was resolved by reordering express middleware so that static middleware is located below Webpack middlewares.

choch-o commented 7 years ago

The issue is also addressed in Issue #160