- With the simplification of Editing Support work we have added the following breaking changes to the
sitecore-jss-react
package. Please make the necessary updates.ComponentConsumerProps
is removed. You might need to reuse WithSitecoreContextProps type.
- Replace
scripts/generate-config.js
if you have not modified it. Otherwise:-
Add a
trim()
call toconfig[prop]
and replace comma before a newline (,
) with semicolon (;
) in configText prop assignment so it would look like this:configText += `config.${prop} = process.env.REACT_APP_${constantCase(prop)} || "${ config[prop]?.trim() }";\n`;
-
- Replace
scripts/generate-config.ts
if you have not modified it. Otherwise:-
Add a
trim()
call toconfig[prop]
(use toString() to avoid type conflicts) and replace commas before a newline (,
) with semicolon (;
) in configText prop assignments so it would look like this:configText += `config.${prop} = process.env.${constantCase(prop)} || "${config[prop]?.toString().trim()}";\n`;
-
- Replace
scripts/generate-config.js
if you have not modified it. Otherwise:-
Add a
trim()
call toconfig[prop]
and replace commas before a newline (,
) with semicolon (;
) in configText prop assignments so it would look like this:configText += `config.${prop} = process.env.VUE_APP_${constantCase(prop)} || "${ config[prop]?.trim() }";\n`;
-
- Replace
scripts/generate-config.ts
if you have not modified it. Otherwise:-
Add a
trim()
call toconfig[prop]
and replace comma before a newline (,
) with semicolon (;
) in configText prop assignment so it would look like this:configText += `config.${prop} = process.env.${constantCase(prop)} || '${config[prop]?.trim()}';\n`;
-
-
Render a new
EditingScripts
component in yourScripts.ts
file to support a new Editing Integration feature.import { EditingScripts } from '@sitecore-jss/sitecore-jss-nextjs'; ... const Scripts = (): JSX.Element | null => ( <> <EditingScripts /> ... </> );
-
We have introduced a new configuration option,
pagesEditMode
, in the\src\pages\api\editing\config.ts
file to support the new metadata architecture for pages. This option allows you to specify the editing mode used by Pages. It is set tometadata
by default. However, if you don't prefer usemetadata
and continue using the existing architecture, you can explicitly set thepagesEditMode
tochromes
.const handler = new EditingConfigMiddleware({ ... pagesEditMode: EditMode.Chromes, }).getHandler();