Suggestion: Add the ability to specify paths to custom transformers in tsconfig.json #14654
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Suggestion
An idea for TypeScript
Background
#13940 adds
customTransformers
toProgram.emit()
that "run custom transformations before and after the main transformation pipeline".So the code to do this looks like the following:
Problem
In order to apply a custom transformation, the compiler api must be used. It's takes a bit of work to set this up and most people won't do this for the sake of custom transformations.
It would be nice if there was an easy way to be able to apply custom transformations so that they could be easily shared with others.
Potential Solution
Add the ability so specify paths to custom transformers in tsconfig.json.
So for example:
This would most likely use the default export from the package or file specified (requiring it to export a
TransformerFactory<SourceFile>
object).The text was updated successfully, but these errors were encountered: