From f16494e5deb0cebb9cf3d6eecff25f761fab6153 Mon Sep 17 00:00:00 2001 From: Victor Bocharsky Date: Sun, 23 Dec 2018 00:45:18 +0200 Subject: [PATCH] Add .splitEntryChunks() to webpack.config.js --- symfony/webpack-encore-bundle/1.0/webpack.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/symfony/webpack-encore-bundle/1.0/webpack.config.js b/symfony/webpack-encore-bundle/1.0/webpack.config.js index 6dc3bc21..2f7e205c 100644 --- a/symfony/webpack-encore-bundle/1.0/webpack.config.js +++ b/symfony/webpack-encore-bundle/1.0/webpack.config.js @@ -21,6 +21,9 @@ Encore //.addEntry('page1', './assets/js/page1.js') //.addEntry('page2', './assets/js/page2.js') + // When enabled, Webpack "splits" your files into smaller pieces for greater optimization. + .splitEntryChunks() + // will require an extra script tag for runtime.js // but, you probably want this, unless you're building a single-page app .enableSingleRuntimeChunk()