Skip to content

Add bundle linter to check for vue in main

What does this MR do?

Checks the stats.json file generated by webpack-bundle-analyzer to see if vue.esm.js is included in main.js.

Here is the smallest example of this JSON file: https://github.com/th0r/webpack-bundle-analyzer/blob/6091fe6e248ef6d5745c850911a255d9770d4106/test/stats/with-invalid-dynamic-require.json

So here,

  1. Find the vue module
  2. Find the main chunk
  3. Check that the main chunk ID is not in the vue module's chunks array.

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/31956

Merge request reports