Skip to content

Get entry files in Transformer plugin #9245

Answered by mischnic
hellos3b asked this question in Q&A
Discussion options

You must be logged in to vote

That is currently not possible in a transformer, I guess because these entry files could also be imported by something else in your project, so the cases are actually "entry", "entry but also imported", and "imported".

Resolvers do have access to this information (dependency.sourcePath == null if it's an entry). The question is how you then forward this from the resolver to a transformer. Maybe with query which is then available in the transformer as asset.query.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hellos3b
Comment options

Answer selected by mischnic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants