New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for code splitting? #560
Comments
@rossta Hey, thanks for opening the discussion here. I have been thinking about chunking setup but didn't arrive to any final conclusion, mainly because of the varied use cases and probably this might make usage bit confusing i.e. adding an extra vendor file along with the pack file. At the moment common chunk setup lives in the Readme and there is no documentation on using DLL plugin. Perhaps we just document the usage? What do you think? |
@javan Thanks for your thoughts. I can see your point about varied use cases and possible confusion. We're trying to evaluate how best to maintain our Webpack js config files as we add functionality and our config starts to diverge from the Webpacker generated config through gem version upgrades. For now, documentation and careful merges seem the simplest path forward. I'd be happy to submit README documentation if we decide to go ahead with the DLL plugin to support code splitting in our app. |
I apologise for reviving a dead issue, but @rossta did you find any solutions that work well with Webpacker? Our application has grown, and it now takes around 90s for a complete rebuild, so we would like to split up the build process. |
@lucaspiller We're currently using the |
Any updates to this issue? I've got code splitting working for egghead.io with server-side rendering and Rails (Webpack v4, react-loadable, react-router v4). We're only using rails/webpacker for the view helpers. What's amazing about the code splitting is how the JS code knows just what JS and CS to load. So you don't have to put in the script tags for the used bundles. The setup uses React on Rails, including rails/webpacker. |
I wanted to open the discussion as to whether the default Webpacker configuration should take a stance on code-splitting, which can yield better build times and improved caching. There appear to be a few popular approaches, including using the
CommonsChunkPlugin
and theDllPlugin
+DllReferencePlugin
. The "Dll" approach appears to be more powerful but would impact the design of current Webpacker config more significantly.Thoughts?
The text was updated successfully, but these errors were encountered: