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

[Nextjs][Multisite] Fix skipped site info fetch #1434

Merged
merged 4 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -34,6 +34,7 @@ Our versioning strategy is as follows:
* `[sitecore-jss-nextjs]` Fix for Link component which throws error if field is undefined ([#1425](https://github.com/Sitecore/jss/pull/1425))
* `[templates/react]` Fix compilation error when developing react template in monorepo ([#1428](https://github.com/Sitecore/jss/pull/1428))
* `[sitecore-jss-nextjs]` Fix regex for middleware redirects ([#1431](https://github.com/Sitecore/jss/pull/1431))
* `[templates/nextjs-multisite]` Fix skipped site info fetch ([#1434](https://github.com/Sitecore/jss/pull/1434))

## 21.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { GraphQLSiteInfoService, SiteInfo } from '@sitecore-jss/sitecore-jss-nex
* You could easily modify this to fetch from another source such as a static JSON file instead.
*/
class MultisitePlugin implements ConfigPlugin {
order = 3;
order = 4;

async exec(config: JssConfig) {
let sites: SiteInfo[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import { ConfigPlugin, JssConfig } from '..';
*/
class ComputedPlugin implements ConfigPlugin {
// should come after other plugins (but before fallback)
order = 10;
order = 3;
addy-pathania marked this conversation as resolved.
Show resolved Hide resolved

async exec(config: JssConfig) {
return Object.assign({}, config, {
graphQLEndpoint: config.graphQLEndpoint || `${config.sitecoreApiHost}${config.graphQLEndpointPath}`,
graphQLEndpoint:
config.graphQLEndpoint || `${config.sitecoreApiHost}${config.graphQLEndpointPath}`,
});
}
}
Expand Down