Comments (4)
I'm using react-loadable
in the 60fram.es boilerplate, e.g. https://github.com/60frames/react-boilerplate/blob/master/src/components/index/IndexLoadable.js
NOTE: It uses an older version of
react-loadable
, a more recent version I used on another project required the use of their babel plugin or you need to manually faff around withimport-inspector
The key is to disable code splitting when SSRing with:
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
from webpack-hot-server-middleware.
I eventually have the time to look at the boilerplate, it sounds very promising, thank you @richardscarrott
Have you considered webpack v3, react-router v4 and react-loadable v5?
I'd like to use the last versions, did you encounter any issue with those for SSR with data fetching and code splitting?
from webpack-hot-server-middleware.
I've got code splitting working on a private project using Webpack v3 and react-loadable v5, no real problems with those.
I've avoided upgrading to React Router v4 on any projects because the departure from a centralised config means it's no longer possible to match components before rendering to determine data dependencies.
I've heard https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config is a potential solution but tbh it doesn't seem like it has first class support from the react-router team.
from webpack-hot-server-middleware.
Check out react-universal-component, redux-first-router, and redux-first-router-demo
from webpack-hot-server-middleware.
Related Issues (20)
- Side effect from require server render from string
- listen EADDRINUSE: address already in use :::8080 HOT 2
- please remove `yarn` from dependencies HOT 4
- TypeError: serverRenderer is not a function
- Hangs when errors are thrown inside server bundle HOT 1
- filtering websocket webpack-hot-reloading calls from react-hot-server-middleware HOT 1
- serverRenderer is not a function HOT 10
- serverRenderer is not a function HOT 1
- My entry chunk is renamed to an async chunk HOT 2
- is it possible to call the default route from another route in express HOT 5
- serverRender is not a function
- use webpack-hot-server-middleware with typescript HOT 2
- Another "serverRenderer is not a function" question. HOT 4
- React Redux store not found in context HOT 4
- cannot find module 'react'
- Why is yarn in runtime dependencies? HOT 1
- Separating Routes? HOT 6
- Error is thrown when the example is run.
- Error when compiling when using Hapijs HOT 1
- bug flow type HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-hot-server-middleware.