-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dependency resolution and ordering for transformers #219
Comments
If ServerSideRendering required PreloadHeroImages would we be able to skip PreloadHeroImages? |
If |
Ok, good idea. |
Why use tags when you could just use the transformer class names? |
@westonruter: So, if someone provides a custom implementation of SSR, the transformers depending on SSR should still be able to work together with that custom implementation. |
Based on a discussion in Slack with @06romix:
What I was thinking of was to have two interfaces with corresponding methods:
The interfaces can be checked with
instanceof
without even instantiating the classes. The strings that are returned can be thought of as "tags". So, one or more transformers could require'ssr'
, and theServersideRendering
transformer would provide'ssr'
. If someone replaces that transformer with a custom one, they can still have it provide'ssr'
to fulfil the dependency chain.The ordering can then happen based on these tags, provided that it is resolvable. If it is not, there is obviously already a problem that needs to be solved.
The text was updated successfully, but these errors were encountered: