mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #4927 from overleaf/jpa-as-webpack-auto-code-splitting
Change webpack code splitting strategy GitOrigin-RevId: 5af615db68e169942e1d37cd0251775cb68c568b
This commit is contained in:
parent
a1c74f27d9
commit
cb9e4a41e0
1 changed files with 3 additions and 13 deletions
|
@ -231,21 +231,11 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
|
||||
// Split out vendored dependencies that are shared between 2 or more "real
|
||||
// bundles" (e.g. ide.js/main.js) as a separate "libraries" bundle and ensure
|
||||
// that they are de-duplicated from the other bundles. This allows the
|
||||
// libraries bundle to be independently cached (as it likely will change less
|
||||
// than the other bundles)
|
||||
// Split out files into separate (derived) bundles if they are shared between
|
||||
// multiple (explicit) bundles, according to some webpack heuristics
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
libraries: {
|
||||
test: /[\\/]node_modules[\\/]|[\\/]frontend[\\/]js[\\/]vendor[\\/]libs[\\/]/,
|
||||
name: 'libraries',
|
||||
chunks: 'initial',
|
||||
minChunks: 2,
|
||||
},
|
||||
},
|
||||
chunks: 'all',
|
||||
},
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue