Enable split chunk plugin in development #31309
Replies: 10 comments
-
I would like to do this. |
Beta Was this translation helpful? Give feedback.
-
@kumaran-14 awesome! Give it a go! |
Beta Was this translation helpful? Give feedback.
-
@KyleAMathews Sure. How should I proceed on this? Currently I'm going through contributing docs. |
Beta Was this translation helpful? Give feedback.
-
@kumaran-14 there's a good documentation on how to contribute here :) |
Beta Was this translation helpful? Give feedback.
-
This is a fairly tricky issue. You'll need to look at how production-app.js works vs app.js and change app.js to use the async-requires.js file. |
Beta Was this translation helpful? Give feedback.
-
@Manoz Thanks, I looked into that. |
Beta Was this translation helpful? Give feedback.
-
@KyleAMathews is this the change required in app.js ?
|
Beta Was this translation helpful? Give feedback.
-
That's the start :-) there'll be more work to change how dev the selects components to render |
Beta Was this translation helpful? Give feedback.
-
Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open! |
Beta Was this translation helpful? Give feedback.
-
This issue is being closed due to inactivity. Is this a mistake? Please re-open this issue or create a new issue. |
Beta Was this translation helpful? Give feedback.
-
I disabled it for no good reason and webpack maintainers say it's faster for webpack to do HMR with chunks + it'd be faster to load dev sites if you don't have to load all code up front.
The main work to do I think is to make both dev and prod use async-requires.js from .cache as that'll automatically create splits in development. Also update loading resources for development so similar to production.
This will speedup loading the development site as there'll be far less JS loaded initially for larger sites. E.g. gatsbyjs.com loads 8mbs of JS right now.
Beta Was this translation helpful? Give feedback.
All reactions