separate webpack runtime into its own chunk to maintain cacheability of common chunk

This commit is contained in:
Mike Greiling 2017-03-02 00:35:44 -06:00
parent 7371f6cd8c
commit ba865db378
2 changed files with 3 additions and 3 deletions

View file

@ -28,6 +28,7 @@
= stylesheet_link_tag "application", media: "all"
= stylesheet_link_tag "print", media: "print"
= javascript_include_tag(*webpack_asset_paths("manifest"))
= javascript_include_tag(*webpack_asset_paths("common"))
= javascript_include_tag(*webpack_asset_paths("application"))

View file

@ -98,10 +98,9 @@ var config = {
new webpack.HashedModuleIdsPlugin() :
new webpack.NamedModulesPlugin(),
// create a common.js bundle to be loaded on every page
// create cacheable common library bundles
new webpack.optimize.CommonsChunkPlugin({
name: 'common',
minChunks: Infinity,
names: ['application', 'common', 'manifest'],
}),
],