diff options
author | silverwind | 2020-08-02 16:06:06 +0200 |
---|---|---|
committer | GitHub | 2020-08-02 15:06:06 +0100 |
commit | 4d9f59a45d9d5e762584e213f51937291510d323 (patch) | |
tree | e615b535960e199445489870f0c57fee02cf9b95 /webpack.config.js | |
parent | 7b260acd7b3abf8c7b69cc50340c91ac5808a938 (diff) |
Split up monaco's language chunks (#12401)
This should speed up monaco's loading time by splitting the current
3.71MB chunk monaco.js into 63 individual files named 1 to 63.js in
the output directory. There seems to be no way to get a better file
naming scheme unfortunately. I opted to exclude those files in the
webpack output for brevity.
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/webpack.config.js b/webpack.config.js index f21c48199..e733a7784 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -97,14 +97,6 @@ module.exports = { splitChunks: { chunks: 'async', name: (_, chunks) => chunks.map((item) => item.name).join('-'), - cacheGroups: { - // this bundles all monaco's languages into one file instead of emitting 1-65.js files - monaco: { - test: /monaco-editor/, - name: 'monaco', - chunks: 'async', - }, - }, }, }, module: { @@ -325,5 +317,10 @@ module.exports = { }, stats: { children: false, + excludeAssets: [ + // exclude monaco's language chunks in stats output for brevity + // https://github.com/microsoft/monaco-editor-webpack-plugin/issues/113 + /^js\/[0-9]+\.js$/, + ], }, }; |