Skip to content

Instantly share code, notes, and snippets.

@nitish24p
Created January 18, 2018 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nitish24p/2be7e95d0b21651bf95f5c463c399748 to your computer and use it in GitHub Desktop.
Save nitish24p/2be7e95d0b21651bf95f5c463c399748 to your computer and use it in GitHub Desktop.
Code split react loadable
/// Somewhere on your express server
import Loadable from 'react-loadable';
Loadable.preloadAll().then(() => {
server.listen(port, function () {
console.log('Express server listening on port ' + server.address().port);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment