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
I am using a custom transformer to modify an asset (.ts file) - it removes certain parts of that file. I have added that transfomer as the first in the pipeline. This works fine for bundling. Now, I would also like to generate type definitions. So, I have added the same transformer in the 'types' pipeline:
Now, the default transformer for type generation is "@parcel/transformer-typescript-types". It seems to me that this transformer does not use the asset.code property for further processing but only asset.filePath to access the file directly from filesystem. Therefore, changes of the preprocessor are ignored in generated types.
What would be a good way to handle this situation?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am using a custom transformer to modify an asset (.ts file) - it removes certain parts of that file. I have added that transfomer as the first in the pipeline. This works fine for bundling. Now, I would also like to generate type definitions. So, I have added the same transformer in the 'types' pipeline:
Now, the default transformer for type generation is "@parcel/transformer-typescript-types". It seems to me that this transformer does not use the
asset.code
property for further processing but onlyasset.filePath
to access the file directly from filesystem. Therefore, changes of the preprocessor are ignored in generated types.What would be a good way to handle this situation?
Beta Was this translation helpful? Give feedback.
All reactions