-
Notifications
You must be signed in to change notification settings - Fork 1
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: add onTarget to template recommendations config #1132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we go deeper with the object? or no?
'recommendation.bundle': { | ||
RecommendationBundle: async () => { | ||
return ( | ||
this.components.recommendation.Recommendation || | ||
(this.components.recommendation.Recommendation = (await import('./library/components/Recommendation')).Recommendation) | ||
this.components['recommendation.bundle'].RecommendationBundle || | ||
(this.components['recommendation.bundle'].RecommendationBundle = ( | ||
await import('./library/components/RecommendationBundle') | ||
).RecommendationBundle) | ||
); | ||
}, | ||
RecommendationBundle: async () => { | ||
}, | ||
'recommendation.default': { | ||
Recommendation: async () => { | ||
return ( | ||
this.components.recommendation.RecommendationBundle || | ||
(this.components.recommendation.RecommendationBundle = (await import('./library/components/RecommendationBundle')).RecommendationBundle) | ||
this.components['recommendation.default'].Recommendation || | ||
(this.components['recommendation.default'].Recommendation = (await import('./library/components/Recommendation')).Recommendation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to not actually go another level deeper in the object instead of using a .
to delimit the path superficially?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason. I think I'd actually prefer a /
instead of .
since we don't do this else where. Nested object would also work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there is good reason, I think my preference here is nested object.
No description provided.