Explorar el Código

Move runtimeChunk optimisation to production webpack config (#18982)

GitOrigin-RevId: 99b0923cee62118fbd69e234c16bf1eb0ace6abc
Alf Eaton hace 2 años
padre
commit
d7ded4d0cb
Se han modificado 2 ficheros con 4 adiciones y 6 borrados
  1. 0 6
      services/web/webpack.config.dev.js
  2. 4 0
      services/web/webpack.config.js

+ 0 - 6
services/web/webpack.config.dev.js

@@ -93,10 +93,4 @@ module.exports = merge(base, {
     preset: 'minimal',
     colors: true,
   },
-
-  optimization: {
-    runtimeChunk: {
-      name: 'runtime',
-    },
-  },
 })

+ 4 - 0
services/web/webpack.config.js

@@ -110,6 +110,10 @@ module.exports = {
     splitChunks: {
       chunks: 'all', // allow non-async chunks to be analysed for shared modules
     },
+    // https://webpack.js.org/configuration/optimization/#optimizationruntimechunk
+    runtimeChunk: {
+      name: 'runtime',
+    },
   },
 
   // Define how file types are handled by webpack