Allow config of templating util settings from app directly #1782
philipbushnell-valtech
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
@philipbushnell-valtech sounds like we have been trying to implement something similar to this. I have added these details to our backlog for review. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your suggestion related to a problem? Please describe.
In sitecore-jss-dev-tools/src/templating/utils.ts there are settings for finer control over how items are retrieved yet these settings are not configurable beyond their internal usages (e.g. in sitecore-jss-dev-tools/src/templating/components.ts).
In our app, we have additional co-located files alongside our components (e.g. for testing) but without being able to change the
fileFormat
setting, it fails our build due to it outputting irrelevant files in the generatedcomponentBuilder
file (and things such as test globals likedescribe
are not being explicitly imported so fail).Describe the solution you'd like
It would be massively helpful if these could be configured from the application directly (e.g. via generateComponentBuilder). It should be relatively quick to update function params to allow better customisation.
Is there a way to achieve this functionality with exisiting tools?
I've had to
patch-package
a regex setting change to work around this issue but it would be much better to just configure the settings directly in the app (i.e. inscripts/generate-component-builder/plugins/component-builder.ts
) but I can't.Additional information
Copied over from #1775 where I incorrectly raised this.
Beta Was this translation helpful? Give feedback.
All reactions