Request option to minify with sourcesContent attribute in the map files
dvdpluijm opened this issue · 1 comments
For a project of a customer we are using Datadog as monitoring tool. Datadog requires to upload sourcemap files including the sourcesContent attribute.
For reference: https://docs.datadoghq.com/real_user_monitoring/guide/upload-javascript-source-maps/?tab=webpackjs#instrument-your-code
So instead of only referring to the debug files I want to also include the actual source code in the map files like:
command/> ui5 build --clean-dest
-> library-preload.js (minified)
-> contains reference like //# sourceMappingURL=library-preload.js.map
-> library-preload.js.map
-> contains references to sources like: ...,"sources":["SomeFileInTheLibrary-dbg.js"],... "sourcesContent: [...actual source code from SomeFileInTheLibrary...]"
Thank you for your suggestion. We appreciate your interest in enhancing the project's functionality.
Our team has decided not to implement this proposed enhancement. The reason behind this decision is that including the actual source code in the sourcemap files would significantly increase the build output, which goes against our goal of keeping the build process as lightweight as possible.
However, we understand that this feature is important to you and your project's requirements. We recommend exploring the possibility of enhancing the "sourcesContent" attribute via a custom task or a script that runs after the build process. All required sources are already part of the build output. This way, you can tailor the sourcemap files to fit your needs.
Thank you for your understanding, and please let us know if you have any further questions or suggestions.