React Starter v1.1.1 is now available.
Changes
This update includes the following:
- Resolved an issue where
routeLoadOptions
wasn’t returning properly due to its inclusion in anall()
effect (b961744d) ( 0f2e391c) - Restored support for reverse proxy path wildcards (fb3b5616)
RouteLoadOptions
The routeLoadOptions
bug is a particularly frustrating issue as it prevents global options, such as preventScrollTop
and entryLinkDepth
(declared within withEvents.ts
), from working at all. Thankfully the fix simply requires returning onRouteLoad
options indepdendently of the all()
effect:
src/app/routes/withEvents.ts
export default {
onRouteLoad: function* onRouteLoad({ ssr }) {
const routeLoadOptions: RouteLoadOptions = {
customNavigation: {
ancestors: false,
children: false,
siblings: false,
tree: true,
},
};
- return yield all([call(getSiteConfigSaga, ssr), routeLoadOptions]);
+ yield all([call(getSiteConfigSaga, ssr)]);
+ return yield routeLoadOptions;
},
onRouteLoaded: function* onRouteLoaded(onRouteLoadedArgs) {
...
},
} as WithEvents;
Proxy paths
This bug only affects development environments and may have prevented assets reverse proxied in from Classic Contensis from loading. The fix requires appending wildcards (*
) to the appropriate paths:
webpack/define-config.js
const REVERSE_PROXY_PATHS = Object([
- '/image-library',
- '/video-library',
- '/asset-library',
+ '/image-library/*',
+ '/video-library/*',
+ '/asset-library/*',
]);