瀏覽代碼

Make built-in extensions shared eagerly

This ensures that the extensions can be packed into larger bundles, rather than individually bundled. The assumption here is that built-in things will all be needed, or at least that relatively few will be disabled.

Individual extensions can still load parts of themselves asynchronously to be separately bundled and loaded on-demand (for example, codemirror themes, the codemirror vim extension, etc.).
Jason Grout 4 年之前
父節點
當前提交
b7d3f2bde5
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      dev_mode/webpack.config.js

+ 3 - 1
dev_mode/webpack.config.js

@@ -170,7 +170,9 @@ for (let [key, requiredVersion] of Object.entries(package_data.resolutions)) {
   if (requiredVersion.startsWith('file:')) {
     requiredVersion = require(`${key}/package.json`).version;
   }
-  shared[key] = { requiredVersion };
+  // eager so that built-in extensions can be bundled together into just a few
+  // js files to load
+  shared[key] = { requiredVersion, eager: true };
 }
 
 // Add singleton package information