-
Notifications
You must be signed in to change notification settings - Fork 817
feat: tag transform #6211
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
feat: tag transform #6211
Conversation
Hi @johnjenkins, would these changes extend to the framework adapters OOTB/'as is', or would that require additional changes in the output-targets repo?
We're running a React MFE architecture and would really benefit from being able to transform the tags at runtime to avoid version registration clashes between feature teams running different versions of the stencil component lib - just wondering whether these changes could facilitate that in future.
Thanks!
hey @elliottdaviesss - Thanks for the interest!
Yes, it would involve some tweaks in the output adapters (wrapping tagName
references in the newly exported transformTag(tagName)
)
On reflection, idk if what i've done here is the best approach; @Cliffback has came up with a slightly different strategy which you can use at https://github.com/Cliffback/stencil-custom-suffix-output-target (doesn't work with react output atm I think).
I like the fact it's an output target, plus it does some extra bits like transforming css selectors.
hey @elliottdaviesss - Thanks for the interest!
Yes, it would involve some tweaks in the output adapters (wrapping
tagName
references in the newly exportedtransformTag(tagName)
)On reflection, idk if what i've done here is the best approach; @Cliffback has came up with a slightly different strategy which you can use at https://github.com/Cliffback/stencil-custom-suffix-output-target (doesn't work with react output atm I think). I like the fact it's an output target, plus it does some extra bits like transforming css selectors.
@johnjenkins I could give transforming the other output targets the same way, so that it would work with react as well?
My main focus has been on angular so far, as that is what we need at work, but would be nice to expand it now that it is on npm regardless
What is the current behavior?
GitHub Issue Number: N/A
What is the new behavior?
Documentation
Does this introduce a breaking change?
Testing
Other information