As per the Sitecore documentation, applications built with JSS
for Next.js
are deployed differently than apps built with JSS for React
, Angular
, and Vue.js
. The document states the following.
Specifically, when working with JSS for Next.js
remember the following:
Do not use the JSS CLI
commands jss deploy app
or jss deploy files
.
Use jss deploy items
for code-first item import.
You do not have to configure a sitecoreDistPath
in your package.json
file.
The Link and RichText field helper components support client-side routing out of the box.
If you add .graphql
files to your solution or make changes to your Sitecore data model (templates), you must update GraphQL introspection.
The Next.js
app is configured to proxy Sitecore media requests. Therefore, the Layout Service excludes server URLs.
For more information follow this document.
https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/sitecore-jss-for-next-js-differences-from-jss-for-react,-angular,-and-vue-js.html
Features:
https://doc.sitecore.com/xp/en/developers/hd/190/sitecore-headless-development/sitecore-javascript-rendering-sdk--jss--for-next-js.html
Hope this helps.
jss deploy config
?