There are additional steps that have to be wired together:
Start application after bundling
pre-render pages
Add them to build folder
Isomorphic rendering is achieved for production
When building for production, prerender-xs is used to generate index.html for all routes
Pre-rendered contents of build folder will be served by express located in test-server folder or simply by running npm run deploy:express
Note that this is isomorphic rendering which means that after an index.html is served for a particular route any other react-router navigation using <Link> component remains as client-side-routing
Mock api is configured in webpack.dev.ts using connect-api-mocker package
Configure webpack-dev-server in webpack.dev.ts to serve mock API
Make sure mocks are available. Look at JsonPlaceholderApi.ts to see how is it set up.
Switch between mock and non-mock mode in configs.ts
Deployment to netlify is possible by running npm run deploy:netlify after installing netlify-cli npm package
Sitemap will be automatically generated based on routes defined for react-router in routes.ts
When trying to code-split Typescript there it's necessary to set module to esnext in tsconfig.json. If you're using typescript webpack configuration there will be extra steps that needs to be taken. That's to:
install cross-env
add tsconfig.webpack.json so that webpack configuration doesn't get read as esnext modules
add TS_NODE_PROJECT=tsconfig.webpack.json to npm run scripts