-
Notifications
You must be signed in to change notification settings - Fork 276
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
[FEAAS] Nextjs Image for FEAAS #1754
Conversation
packages/create-sitecore-jss/src/templates/nextjs-xmcloud/src/Scripts.tsx
Outdated
Show resolved
Hide resolved
...es/create-sitecore-jss/src/templates/nextjs-xmcloud/src/components/FEAASElementOverrides.tsx
Outdated
Show resolved
Hide resolved
packages/create-sitecore-jss/src/templates/nextjs/next.config.js
Outdated
Show resolved
Hide resolved
Good progress forward, but we need to ensure that we are not dropping the ball on non-whitelisted images. As we're building a foolproof drop-in solution, and we need to balance the security concerns... we at least need to do the best effort. In this case, it should be not discarding the image. |
Short update on implementation: we cannot match nextjs's matching logic without an extra dependency. |
packages/create-sitecore-jss/src/templates/nextjs-xmcloud/src/components/FEAASScripts.tsx
Show resolved
Hide resolved
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.
I approved, looks good 👍
Wait for Adam's approve and feel free to merge
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.
Looks great! 👍
Description / Motivation
This change will ensure nextjs's implementation for Image is used when img elements are rendered withing FEAAS Components (from Component Builder). It also adds remotePatterns presets for dev and prod in nextjs.config - to allow easier management of rules for editing/dev and live deployments.
Note: FEAAS call is put into a separate component so as to not bloat Scripts.tsx. The feaas logic also doesn't belong under /byoc folder - so we're not putting it in byoc/index either.
Testing Details
Types of changes