From fed0b75cb5ac51f2361cb66e74e7df24eebac998 Mon Sep 17 00:00:00 2001 From: "Keith Bauer @ Sitecore" <65358900+sc-keithbauer@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:40:16 -0400 Subject: [PATCH] [sitecore-jss-nextjs]: Expose MiddlewareBase class and MiddlewareBaseConfig type (#1941) --- CHANGELOG.md | 5 ++++- packages/sitecore-jss-nextjs/src/middleware/index.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3592672a4e..339e06b2d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,12 @@ Our versioning strategy is as follows: ### 🐛 Bug Fixes * `[sitecore-jss-nextjs]` `[sitecore-jss]` Resolved an issue with Netlify where URL query parameters were being sorted, causing redirect failures. Added a method to generate all possible permutations of query parameters, ensuring proper matching with URL patterns regardless of their order. ([#1935](https://github.com/Sitecore/jss/pull/1935)) -* `[sitecore-jss-nextjs]` Resolved an issue with Netlify where URL query parameters were being sorted, causing redirect failures. Added a method to generate all possible permutations of query parameters, ensuring proper matching with URL patterns regardless of their order. ([#1935](https://github.com/Sitecore/jss/pull/1935)) * `[sitecore-jss-nextjs]` Fixed an issue with language-based redirects, ensuring users are correctly redirected to the appropriate language-specific pages rather than defaulting to the primary language. ([#1938](https://github.com/Sitecore/jss/pull/1938)) +### 🎉 New Features & Improvements + +* `[sitecore-jss-nextjs]` Expose MiddlewareBase class and MiddlewareBaseConfig type ([#1941](https://github.com/Sitecore/jss/pull/1941)) + ## 22.1.3 ### 🐛 Bug Fixes diff --git a/packages/sitecore-jss-nextjs/src/middleware/index.ts b/packages/sitecore-jss-nextjs/src/middleware/index.ts index 3c62846310..68408fac24 100644 --- a/packages/sitecore-jss-nextjs/src/middleware/index.ts +++ b/packages/sitecore-jss-nextjs/src/middleware/index.ts @@ -1,4 +1,5 @@ export { debug } from '@sitecore-jss/sitecore-jss'; +export { MiddlewareBase, MiddlewareBaseConfig } from './middleware'; export { RedirectsMiddleware, RedirectsMiddlewareConfig } from './redirects-middleware'; export { PersonalizeMiddleware, PersonalizeMiddlewareConfig } from './personalize-middleware'; export { MultisiteMiddleware, MultisiteMiddlewareConfig } from './multisite-middleware';