Comments (1)
yea, that's a yet-to-be-solved problem in all of the React game. The only solution is looking like we're gonna have to push things back to the route level, which is the plan for Redux-First Router. I.e. code-splitting coupled to your routing tools.
For now, you're just gonna have to make a hash of routes to chunk names and manually serve the correct chunks (their css + js) based on the route.
I'm gonna close this as I have things in the works for this as part of the Rudy rollout.
ps. styled-components et al are currently grappling with this as well. Most of these packages don't even want to deal with this, as it means a major refactoring, and it's unclear if it's even going to work glitch-free to send style tags at the end of each component. It will work technically, but while streaming, my guess is it might look glitchy on first load on the client, especially on slower connections. If that turns out to be the case, then static route-level-disocvered sheets will be the only solution for real, which is unfortunate since those new css components are otherwise the "right" way for react. That said, you'll still be able to use those components, just not with render-time css. They'll have to make a version of their packages geared towards a more static approach, similar to extractStatic in emotion
.
from webpack-flush-chunks.
Related Issues (20)
- webpack v5: missing dynamic chunks generated by `splitChunks` when chunk IDs are strings
- flushChunkNames is empty
- Duplicate CSS files while flushing HOT 2
- utils.js:50 chunk not available for synchronous require yet:
- Not work with webpack.NamedChunksPlugin or webpack-hashed-chunkids
- reference script file outside of webpack build
- Breaking changes between v1 and v2
- [FLUSH CHUNKS]: Unable to find pages-Home in Webpack chunks. Please check usage of Babel plugin. HOT 19
- Chunk dependencies not flushed when it's moved to a parent
- Questions about flushing and babel plugin
- t
- flushChunks not returns shared css between modules HOT 1
- 2.0.3 tag is missing from GitHub
- Removing LimitChunkCountPlugin: 1 for server HOT 3
- Pass through renderProps in the Component return API
- Raw CSS on development environment
- [FLUSH CHUNKS] warning with TSX, but not with JS
- @loadable/components support
- 52 Vulnerabilities in NPM modules
- [FLUSH CHUNKS]: Unable to find pages-Landing in Webpack chunks. Please check usage of Babel plugin.
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-flush-chunks.