You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal of this project is to demonstrate React SSR with TypeScript and try to keep the dependencies to the bare minimum. Earlier this year I switched from browserify to webpack since that's what seems to be used more in the wild.
I do have a npm run watch that will almost work because the code will rebuild but it won't automatically restart the server. So you will get react warnings that the server side does not match the client side.
However, you can get really close to what you want with no warnings using nodemon.
Opening a terminal and exec npm run watch
Open another terminal and exec npx nodemon (assuming latest npm that ships with npx)
Editing a file and save
Refresh browser
It should pick up the changes, woohoo 🎉
Now there are tools to skip step 4 and auto-refresh the browser for you such as webpack dev server with hot module reloading (HMR). This example might work. Also npm-run-all might work.
I would be happy to accept a PR if you would like to implement 😃 💯
Hi there,
Is there a way to run this project with one command that does the following:
The text was updated successfully, but these errors were encountered: