Skip to content

Instantly share code, notes, and snippets.

@DevinClark
Created August 29, 2016 15:39
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 DevinClark/7d5605d5ef2575eddf6d7d614fec1035 to your computer and use it in GitHub Desktop.
Save DevinClark/7d5605d5ef2575eddf6d7d614fec1035 to your computer and use it in GitHub Desktop.
CommonsChunkPlugin

It takes the modules that are common between X number of your entry points and puts them in a "common.js" file.

So if I have 3 entry points (one for each page of my application) and they all require React, the common.js file will have react in it. I can cache this file longer than the pageX.js files and my pageX.js bundles will be smaller because they don't have React.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment