Skip to content

Explicitly define monaco vendor chunk in webpack

Mike Greiling requested to merge mg-dedupe-monaco-chunks into master

What does this MR do?

Monaco is currently being duplicated across multiple webpack chunks in production. This increases memory consumption when compiling the frontend assets and adds to the total compiled asset size reflected in omnibus. The SplitChunksPlugin is not doing its job properly and about 12MB of unnecessary duplicated code is ending up in our compiled assets.

This change forces all monaco-editor imports to utilize a named common chunk by making explicitly configuring webpack to do so.

/cc @leipert

Screenshots

before (total asset size: 48.8MB) after (total asset size: 36.9MB)
Screen_Shot_2020-04-21_at_2.27.19_AM Screen_Shot_2020-04-21_at_2.26.56_AM

References #215101 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports