(Go: >> BACK << -|- >> HOME <<)

Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
/ sample-app Public archive

Sample application to illustrate the issues I was having combining webpack 2, webpack-dev-server 2, react-router 3, and react-hot-loader 3 beta. See https://github.com/gaearon/react-hot-loader/issues/515 and https://github.com/webpack/webpack-dev-server/issues/742. Update: fixed in both branches master and react-router-4

Notifications You must be signed in to change notification settings

rpoitras/sample-app

Repository files navigation

Sample App

To run the dev server:

yarn install
yarn start

Navigate your browser to http://localhost:4000/sample-app

If you want to run the Spring Server:

./gradlew bootRun

It starts up on http://localhost:8093/sample-app. This isn't necessary, but I left it in as it is the server I am using.

When switching between master and react-router-4 branches, clean up the node_modules directory to get the correct dependencies.

rm ./node_modules
yarn install
yarn start

Troubles with Hot Module Replacement - UPDATE: Fixed as of April 14/17

This is only a problem when using react-router 3.0.2 in the master branch. Version 4.0.0 works fine, react-router-4 branch.

Make changes to some JSX while webpack dev-server is running. Changes are detected. App recompiles. Browser does not update. Changes are reflected if the browser is refreshed.

Console log:

[WDS] App updated. Recompiling...
[WDS] App hot update...
[HMR] Checking for updates on the server...
[WDS] App hot update...
XHR finished loading: GET "http://localhost:4000/sample-app/9dca3639ba77c6e730eb.hot-update.json".
[HMR] Updated modules:
[HMR]  - ./src/main/web/app/routes/About/index.js
[HMR] App is up to date.

About

Sample application to illustrate the issues I was having combining webpack 2, webpack-dev-server 2, react-router 3, and react-hot-loader 3 beta. See https://github.com/gaearon/react-hot-loader/issues/515 and https://github.com/webpack/webpack-dev-server/issues/742. Update: fixed in both branches master and react-router-4

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published