I think it would be convenient to work with, or debug the userscript's code (the result userscript.js bundle) if the third-party code would be in a function in order to easily collapse it with the code editor functional.
With this approach the main userscript code is at top of the file.
or
// "imports"
const JSZip = getJSZip();
// this function's code can be collapsed
function getJSZip() {
// JSZip code
// ...
return JSZip;
}
// your code
// ...
With this approach the third-party code can be collapsed into 1 line with the basic code editor functional by one click and then you will see the the main userscript code.
I think it would be convenient to work with, or debug the userscript's code (the result userscript.js bundle) if the third-party code would be in a function in order to easily collapse it with the code editor functional.
With this approach the main userscript code is at top of the file.
or
With this approach the third-party code can be collapsed into 1 line with the basic code editor functional by one click and then you will see the the main userscript code.