You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the Transform API to support legalComments: 'external' and return a legalComments property with a string of legal comments extracted.
Context
We're trying to support legalComments: 'external' | 'linked' in esbuild-loader, but it seems much more complicated than expected (overriding legalComments to eof, slow/unsafe regex comments extraction, sourcemap compatible code manipulation with magic-string, etc.).
The text was updated successfully, but these errors were encountered:
I could see supporting external, but linked is supposed to have the JavaScript reference the generated output file name and the transform API has no output files. Implementing linked is best done by the caller IMO since the caller will put the returned JavaScript string in an output file, and can then append a comment with the correct file name for the associated comment file. This same rationale is applied for source maps and the transform API too (you can't use linked in that case either).
Feature request
For the Transform API to support
legalComments: 'external'
and return alegalComments
property with a string of legal comments extracted.Context
We're trying to support
legalComments: 'external' | 'linked'
in esbuild-loader, but it seems much more complicated than expected (overridinglegalComments
toeof
, slow/unsafe regex comments extraction, sourcemap compatible code manipulation with magic-string, etc.).The text was updated successfully, but these errors were encountered: