Instanbul does not collect coverage from files with import.meta
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=432759) </details> <!--IssueSummary end--> Seems one of our recent Vite integration merge requests broke `instanbul`, a tool that we use to collect coverage because we added `import.meta` calls: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/entrypoints/main.js or https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/entrypoints/main_ee.js Here is the failed job log https://gitlab.com/gitlab-org/gitlab/-/jobs/5596785620#L4544 which has the following error: ``` Failed to collect coverage from /builds/gitlab-org/gitlab/app/assets/javascripts/entrypoints/main.js ERROR: Cannot assign to read only property 'message' of object 'SyntaxError: import.meta may appear only with 'sourceType: "module"' (63:26) Consider renaming the file to '.mjs', or setting sourceType:module or sourceType:unambiguous in your Babel config for this file.' STACK: TypeError: Cannot assign to read only property 'message' of object 'SyntaxError: import.meta may appear only with 'sourceType: "module"' (63:26) Consider renaming the file to '.mjs', or setting sourceType:module or sourceType:unambiguous in your Babel config for this file.' ```
issue