Launch options 'concatenated scripts' doesn't create source maps with already minified files
Project: https://playcanvas.com/project/1019795/overview/concatenate-issue
Enable concatenated scripts in the launch options:

When launching, source maps aren't generated in the scripts.js file

This is because on the pipeline job, we rely on Terser to concatenate files and if fails, it falls back to simple string concatenation.
Seems to be specific to certain files/contents of files.
vconsole.min.js gives the following error when trying to use terser
20221215-135617 % terser vconsole.min.js --parse bare_returns --source-map url='inline',includeSources=true -o test.js
ERROR: Invalid character
at btoa (node:buffer:1228:13)
at minify (/usr/local/lib/node_modules/terser/dist/bundle.min.js:29852:103)
at run_cli (/usr/local/lib/node_modules/terser/dist/bundle.min.js:30093:22)
at run_cli (/usr/local/lib/node_modules/terser/dist/bundle.min.js:30053:5)
Looking at it more, terser is trying to base64 the source code to inline the source maps. Problem is that there is something in the code that it can't convert to base64
May be a non issue once Scripts v3 is released next year
This has been fixed in https://github.com/terser/terser/commit/6c726e90ddc048f2e4639d0681d3e6fbae90cf60
Will have to wait for the next tag release :)
Note to self, terser is now on 5.16.6 and we are on 5.13.1. I would like to think I just update this with no issue 😅