Description
I'm trying to figure out what to do about evanw/esbuild#668, which is an issue someone logged with esbuild because esbuild's export syntax doesn't exactly match the magic syntax forms used by this library.
I'm using a for-loop to generate export getters since it minifies better, but to work with this library I would presumably have to write out a long verbose list of Object.defineProperty()
calls instead. This is undesirable both for minification reasons and because it would require me to support another code path, which is more overhead for me in terms of code complexity and would lead to a bigger test matrix.
Would you consider adding some way to annotate the exports that are available in a given file without having to rewrite the JavaScript in the file? A comment with something like //# cjsExports="someName","someOtherName",...
would work, for example. I'm asking because this seems like the most straightforward solution. This library is trying to get a list of exports and instead of trying to magically infer the exports from the code, it could just read them out directly from a list.