Skip to content
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

[Next.js] [Multisite] Skip site info fetch on XM Cloud rendering/editing host builds #1649

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Our versioning strategy is as follows:
* `[sitecore-jss-nextjs]` Fix issue when redirects works each every other times. ([#1629](https://github.com/Sitecore/jss/pull/1629))
* `[templates/nextjs]` Fix custom headers. Now in cors-header plugin extends custom headers from next.config.js file. ([#1637](https://github.com/Sitecore/jss/pull/1637))
* `[sitecore-jss-react]` Fix PlaceholderCommon with using two and more dynamic placeholders. ([#1641](https://github.com/Sitecore/jss/pull/1641))
* `[templates/nextjs-multisite]` Fix site info fetch errors (now skipped) on XM Cloud rendering/editing host builds. ([#1649](https://github.com/Sitecore/jss/pull/1649))


## 21.5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ class MultisitePlugin implements ConfigPlugin {

const endpoint = config.sitecoreEdgeContextId ? config.sitecoreEdgeUrl : config.graphQLEndpoint;

if (!endpoint) {
console.warn(chalk.yellow('Skipping site information fetch (missing GraphQL endpoint).'));
if (!endpoint || process.env.SITECORE) {
console.warn(
chalk.yellow(
`Skipping site information fetch (${
!endpoint ? 'missing GraphQL endpoint' : 'building on XM Cloud'
})`
)
);
} else {
console.log(`Fetching site information from ${endpoint}`);

Expand Down