@nuxtjs/i18n-edge 8.3.0-28536559.8961513 → 8.3.0-28556299.6dcbfbb

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/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "nuxt": "^3.0.0-rc.11",
6
6
  "bridge": false
7
7
  },
8
- "version": "8.3.0-28536559.8961513"
8
+ "version": "8.3.0-28556299.6dcbfbb"
9
9
  }
@@ -2,6 +2,7 @@ import { unref, useNuxtApp, useRuntimeConfig } from "#imports";
2
2
  import { getComposer, getLocale, getLocales, getNormalizedLocales } from "../utils.mjs";
3
3
  import { getRouteBaseName, localeRoute, switchLocalePath } from "./routing.mjs";
4
4
  import { isArray, isObject } from "@intlify/shared";
5
+ import { joinURL } from "ufo";
5
6
  export function localeHead(common, {
6
7
  addDirAttribute = false,
7
8
  addSeoAttributes: seoAttributes = true,
@@ -44,8 +45,9 @@ export function localeHead(common, {
44
45
  return metaObject;
45
46
  }
46
47
  function getBaseUrl() {
47
- const i18n = getComposer(useNuxtApp().$i18n);
48
- return unref(i18n.baseUrl);
48
+ const nuxtApp = useNuxtApp();
49
+ const i18n = getComposer(nuxtApp.$i18n);
50
+ return joinURL(unref(i18n.baseUrl), nuxtApp.$config.app.baseURL);
49
51
  }
50
52
  export function getHreflangLinks(common, locales, idAttribute) {
51
53
  const baseUrl = getBaseUrl();
@@ -152,5 +154,5 @@ function hypenToUnderscore(str) {
152
154
  function toAbsoluteUrl(urlOrPath, baseUrl) {
153
155
  if (urlOrPath.match(/^https?:\/\//))
154
156
  return urlOrPath;
155
- return baseUrl + urlOrPath;
157
+ return joinURL(baseUrl, urlOrPath);
156
158
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtjs/i18n-edge",
3
3
  "description": "i18n for Nuxt",
4
- "version": "8.3.0-28536559.8961513",
4
+ "version": "8.3.0-28556299.6dcbfbb",
5
5
  "homepage": "https://i18n.nuxtjs.org",
6
6
  "bugs": {
7
7
  "url": "https://github.com/nuxt-community/i18n-module/issues"