Parcourir la source

Chunk the jupyterlab and lumino modules together when building the core application.

This cuts a stock build of jlab from 114 js file requests down to 25 requests.
Jason Grout il y a 4 ans
Parent
commit
8a57218c70
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      dev_mode/webpack.config.js

+ 7 - 1
dev_mode/webpack.config.js

@@ -293,7 +293,13 @@ module.exports = [
     },
     optimization: {
       splitChunks: {
-        chunks: 'all'
+        chunks: 'all',
+        cacheGroups: {
+          jlab_core: {
+            test: /[\\/]node_modules[\\/]@(jupyterlab|lumino)[\\/]/,
+            name: 'jlab_core'
+          }
+        }
       }
     },
     module: {