const message = "//"; var module = await import(`./name-of-module-${variable}.js`);
the regex will remove everything after the //, despite it being valid javascript. (Example)
In libraries that have previously been minified, it is likely for multiple lines of code to be placed on the same line. This especially becomes an issue when code has strings containing URLs, and/or base64 encoded images, both of which are likely to contain // without actually signifying a comment, and thus could possibly remove large chunks of code that should still be checked.
The check to determine if code has a dynamic import has a small issue with regards to how it handles comments. Within the code:
the regex will remove everything after the //, despite it being valid javascript. (Example)
In libraries that have previously been minified, it is likely for multiple lines of code to be placed on the same line. This especially becomes an issue when code has strings containing URLs, and/or base64 encoded images, both of which are likely to contain
//
without actually signifying a comment, and thus could possibly remove large chunks of code that should still be checked.