@koine/next 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config/index.js CHANGED
@@ -173,9 +173,14 @@ function getRedirects(defaultLocale, routes, permanent, debug) {
173
173
  routesMap = getRoutesMap({}, routes);
174
174
  Object.keys(routesMap).forEach(function (template) {
175
175
  var route = routesMap[template];
176
- // TODO: add option hideDefaultLocaleInUrl
176
+ // TODO: add option hideDefaultLocaleInUrl?
177
+ // this is meant to redirect the URL with the default locale to the same
178
+ // url without locale prefix, e.g.: /en/about -> /about (assuming en is the
179
+ // defualt locale).
180
+ // Actually this redirect seem not to be necessary, probably the i18n routing
181
+ // mechanism of next 12 already does this, enabling causes infinite redirects
177
182
  // if (hideDefaultLocaleInUrl) {
178
- redirects.push(getPathRedirect(defaultLocale, route, permanent));
183
+ // redirects.push(getPathRedirect(defaultLocale, route, permanent));
179
184
  // }
180
185
  if (route.pathname !== getWithoutIndex(template)) {
181
186
  redirects.push(getPathRedirect("", route, permanent));
package/config/index.mjs CHANGED
@@ -165,9 +165,14 @@ export function getRedirects(defaultLocale, routes, permanent, debug) {
165
165
  routesMap = getRoutesMap({}, routes);
166
166
  Object.keys(routesMap).forEach(function (template) {
167
167
  var route = routesMap[template];
168
- // TODO: add option hideDefaultLocaleInUrl
168
+ // TODO: add option hideDefaultLocaleInUrl?
169
+ // this is meant to redirect the URL with the default locale to the same
170
+ // url without locale prefix, e.g.: /en/about -> /about (assuming en is the
171
+ // defualt locale).
172
+ // Actually this redirect seem not to be necessary, probably the i18n routing
173
+ // mechanism of next 12 already does this, enabling causes infinite redirects
169
174
  // if (hideDefaultLocaleInUrl) {
170
- redirects.push(getPathRedirect(defaultLocale, route, permanent));
175
+ // redirects.push(getPathRedirect(defaultLocale, route, permanent));
171
176
  // }
172
177
  if (route.pathname !== getWithoutIndex(template)) {
173
178
  redirects.push(getPathRedirect("", route, permanent));
package/package.json CHANGED
@@ -98,13 +98,13 @@
98
98
  "type-fest": "^3.6.0"
99
99
  },
100
100
  "peerDependencies": {
101
- "@koine/browser": "1.2.1",
102
- "@koine/dom": "1.2.1",
103
- "@koine/react": "1.2.1",
104
- "@koine/utils": "1.2.1"
101
+ "@koine/browser": "1.2.2",
102
+ "@koine/dom": "1.2.2",
103
+ "@koine/react": "1.2.2",
104
+ "@koine/utils": "1.2.2"
105
105
  },
106
106
  "main": "./index.js",
107
107
  "types": "./index.d.ts",
108
- "version": "1.2.1",
108
+ "version": "1.2.2",
109
109
  "module": "./index.mjs"
110
110
  }