mirror of
https://github.com/modrinth/code.git
synced 2026-08-03 06:35:53 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70c4dfab73 | ||
|
|
e1c501caad | ||
|
|
b883a37aeb | ||
|
|
951f36381f | ||
|
|
ae71089e74 | ||
|
|
e45e0fdde9 | ||
|
|
db449d439a |
@@ -12,15 +12,16 @@ Represents the VIntl module options.
|
|||||||
|
|
||||||
**Properties**
|
**Properties**
|
||||||
|
|
||||||
| Property | Default | Description |
|
| Property | Default | Description |
|
||||||
| :---------------------- | :------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| :---------------------- | :-----: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `defaultLocale` | | A string that represents the BCP 47 code of the locale to use by default. |
|
| `defaultLocale` | | A string that represents the BCP 47 code of the locale to use by default. |
|
||||||
| `resolveDir` | `'.'` | An optional string that represents a directory where all the imports associated with the locales are being resolved. If it's relative, then it will be resolved against the Nuxt `srcDir` directory. If this property is not set, modules will be resolved from the Nuxt `srcDir`. |
|
| `resolveDir` | `'.'` | An optional string that represents a directory where all the imports associated with the locales are being resolved. If it's relative, then it will be resolved against the Nuxt `srcDir` directory. If this property is not set, modules will be resolved from the Nuxt `srcDir`. |
|
||||||
| `locales` | | An array of [`LocaleDescriptor`] objects that represent all the configured locales. |
|
| `locales` | | An array of [`LocaleDescriptor`] objects that represent all the configured locales. |
|
||||||
| `storage` | | An optional string that represents either a built-in storage name (`localStorage` / `cookie`), or a node import specifier that exports a custom storage adapter as the default export. |
|
| `storage` | | An optional string that represents either a built-in storage name (`localStorage` / `cookie`), or a node import specifier that exports a custom storage adapter as the default export. |
|
||||||
| `broadcastLocaleChange` | `true` | An optional boolean value that determines whether to use [`BroadcastChannel`] (if available) to synchronize the locale changes between the tabs on the same origin. |
|
| `broadcastLocaleChange` | `true` | An optional boolean value that determines whether to use [`BroadcastChannel`] (if available) to synchronize the locale changes between the tabs on the same origin. |
|
||||||
| `hostLanguageParam` | `'hl'` | An optional name of the query parameter used to override the user language (including automatically detected one). It is used to generate SEO meta tags. Using `null` will disable them. |
|
| `hostLanguageParam` | `'hl'` | **Deprecated.** An optional name of the query parameter used to override the user language (including automatically detected one). It is used to generate SEO meta tags. Using `null` will disable them. |
|
||||||
| `parserless` | `{ enabled: false }` | An optional [`ParserlessOptions`] object or [`ParserlessMode`] which configures the parserless mode. |
|
| `parserless` | `<...>` | An optional [`ParserlessOptions`] object or [`ParserlessMode`] which configures the parserless mode. |
|
||||||
|
| `seo` | `<...>` | An optional [`SEOOptions`] object which configures automatic head tags to improve discoverability of other languages by search engines. |
|
||||||
|
|
||||||
[`BroadcastChannel`]: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
|
[`BroadcastChannel`]: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
|
||||||
[`ParserlessOptions`]: #parserlessoptions
|
[`ParserlessOptions`]: #parserlessoptions
|
||||||
@@ -131,9 +132,9 @@ Represents an import source for the messages file. It is similar to the [`Import
|
|||||||
|
|
||||||
Represents options for the parserless mode.
|
Represents options for the parserless mode.
|
||||||
|
|
||||||
| Property | Description |
|
| Property | Default | Description |
|
||||||
| :-------- | :----------------------------------------------------------------------- |
|
| :-------- | :-----: | :----------------------------------------------------------------------- |
|
||||||
| `enabled` | A `ParserlessMode` value representing the status of the parserless mode. |
|
| `enabled` | `false` | A `ParserlessMode` value representing the status of the parserless mode. |
|
||||||
|
|
||||||
## `ParserlessMode`
|
## `ParserlessMode`
|
||||||
|
|
||||||
@@ -144,3 +145,17 @@ A string or boolean value representing the status of the parserless mode.
|
|||||||
| `always` | `true` | Parserless mode is always enabled, regardless of the mode in which Nuxt is running. |
|
| `always` | `true` | Parserless mode is always enabled, regardless of the mode in which Nuxt is running. |
|
||||||
| `only-prod` | | Parserless mode is only enabled when building Nuxt app for production. |
|
| `only-prod` | | Parserless mode is only enabled when building Nuxt app for production. |
|
||||||
| `never` | `false` | Parserless mode is never enabled, the parser is always present in the runtime. |
|
| `never` | `false` | Parserless mode is never enabled, the parser is always present in the runtime. |
|
||||||
|
|
||||||
|
## `SEOOptions`
|
||||||
|
|
||||||
|
[`SEOOptions`]: #seooptions
|
||||||
|
|
||||||
|
Represents options for the automatic head tags.
|
||||||
|
|
||||||
|
By default VIntl will add `<link>` tags for every language to make search engines aware of other languages, you can disable this by setting `enabled` to `false`.
|
||||||
|
|
||||||
|
| Property | Default | Description |
|
||||||
|
| :----------------------- | :-----: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `enabled` | `true` | A boolean value representing whether VIntl should automatically add `<link>` tags to `<head>` of the site. These tags make search engines aware that your site is provided in different languages. |
|
||||||
|
| `hostLanguageParameter`: | `hl` | A string value representing the query parameter that VIntl would use to configure the language of the site. |
|
||||||
|
| `baseURL` | | **Recommended.** An optional string value representing the base URL of the site. If not set, VIntl will try to guess the URL based on inital request URL or the current `window.location`. |
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
"index.other-page": {
|
"index.other-page": {
|
||||||
"message": "To the other page"
|
"message": "To the other page"
|
||||||
},
|
},
|
||||||
|
"index.use-automatic": {
|
||||||
|
"message": "Use automatic"
|
||||||
|
},
|
||||||
"language": {
|
"language": {
|
||||||
"message": "Language"
|
"message": "Language"
|
||||||
},
|
},
|
||||||
@@ -17,6 +20,9 @@
|
|||||||
"other-page.back": {
|
"other-page.back": {
|
||||||
"message": "Go back"
|
"message": "Go back"
|
||||||
},
|
},
|
||||||
|
"other-page.description": {
|
||||||
|
"message": "You must've clicked me a thousand times"
|
||||||
|
},
|
||||||
"other-page.title": {
|
"other-page.title": {
|
||||||
"message": "Hello from the other page!"
|
"message": "Hello from the other page!"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"generate": "nuxi generate",
|
"generate": "nuxi generate",
|
||||||
"preview": "nuxi preview",
|
"preview": "nuxi preview",
|
||||||
"lint": "eslint --cache .",
|
"lint": "eslint --cache .",
|
||||||
"intl:extract": "formatjs extract \"{,components,composables,layouts,middleware,modules,pages,plugins,utils}/**/*.{vue,ts,tsx,js,jsx,mts,cts,mjs,cjs}\" --ignore '**/*.d.ts' --ignore 'node_modules' --out-file locales/en-US.json --format simple",
|
"intl:extract": "formatjs extract \"{,components,composables,layouts,middleware,modules,pages,plugins,utils}/**/*.{vue,ts,tsx,js,jsx,mts,cts,mjs,cjs}\" --ignore '**/*.d.ts' --ignore 'node_modules' --out-file locales/en-US.json --format crowdin",
|
||||||
"start": "node .output/server/index.mjs"
|
"start": "node .output/server/index.mjs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -23,47 +23,80 @@ const messages = defineMessages({
|
|||||||
id: 'index.other-page',
|
id: 'index.other-page',
|
||||||
defaultMessage: 'To the other page',
|
defaultMessage: 'To the other page',
|
||||||
},
|
},
|
||||||
|
useAutomatic: {
|
||||||
|
id: 'index.use-automatic',
|
||||||
|
defaultMessage: 'Use automatic',
|
||||||
|
},
|
||||||
} as const)
|
} as const)
|
||||||
|
|
||||||
const vintl = useVIntl()
|
const vintl = useVIntl()
|
||||||
const { formatMessage } = vintl
|
const { formatMessage } = vintl
|
||||||
|
|
||||||
|
const changing = ref(false)
|
||||||
|
|
||||||
|
async function changeLocale(locale: string) {
|
||||||
|
if (changing.value) return
|
||||||
|
changing.value = true
|
||||||
|
try {
|
||||||
|
await vintl.changeLocale(locale)
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error changing locale', err)
|
||||||
|
} finally {
|
||||||
|
changing.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const noop = () => {}
|
||||||
|
|
||||||
const currentLocale = computed({
|
const currentLocale = computed({
|
||||||
get() {
|
get() {
|
||||||
return vintl.locale
|
return vintl.locale
|
||||||
},
|
},
|
||||||
set() {
|
set(value) {
|
||||||
// ignore
|
changeLocale(value).then(noop, noop)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
async function onLocaleChange(e: Event) {
|
const useAutomatic = computed({
|
||||||
await vintl.changeLocale(
|
get() {
|
||||||
(e as Event & { target: HTMLSelectElement }).target.value,
|
return vintl.automatic
|
||||||
)
|
},
|
||||||
}
|
set(value) {
|
||||||
|
changeLocale(value ? 'auto' : vintl.locale).then(noop, noop)
|
||||||
|
},
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<h3>{{ formatMessage(messages.options) }}</h3>
|
<h3>{{ formatMessage(messages.options) }}</h3>
|
||||||
<label for="language-select">
|
<div>
|
||||||
{{ formatMessage(messages.language) }}
|
<label>
|
||||||
</label>
|
<input v-model="useAutomatic" type="checkbox" />
|
||||||
<select
|
{{ formatMessage(messages.useAutomatic) }}
|
||||||
id="language-select"
|
</label>
|
||||||
v-model="currentLocale"
|
</div>
|
||||||
@change="onLocaleChange"
|
|
||||||
>
|
<div>
|
||||||
<option
|
<label>
|
||||||
v-for="locale in [...$nuxt.$i18n.$locales.value.keys()]"
|
{{ formatMessage(messages.language) }}
|
||||||
:key="locale.tag"
|
<select
|
||||||
:value="locale.tag"
|
id="language-select"
|
||||||
>
|
v-model="currentLocale"
|
||||||
{{ locale.tag }}
|
:disabled="vintl.automatic"
|
||||||
</option>
|
@change="onLocaleChange"
|
||||||
</select>
|
>
|
||||||
|
<option
|
||||||
|
v-for="locale in [...$nuxt.$i18n.$locales.value.keys()]"
|
||||||
|
:key="locale.tag"
|
||||||
|
:value="locale.tag"
|
||||||
|
>
|
||||||
|
{{ locale.tag }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -28,7 +28,9 @@
|
|||||||
"no-useless-constructor": "off",
|
"no-useless-constructor": "off",
|
||||||
"@typescript-eslint/no-useless-constructor": "warn",
|
"@typescript-eslint/no-useless-constructor": "warn",
|
||||||
"brace-style": "off",
|
"brace-style": "off",
|
||||||
"vue/singleline-html-element-content-newline": "off"
|
"vue/singleline-html-element-content-newline": "off",
|
||||||
|
"vue/max-attributes-per-line": "off",
|
||||||
|
"vue/html-self-closing": "off"
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"extraFileExtensions": [".vue"]
|
"extraFileExtensions": [".vue"]
|
||||||
|
|||||||
@@ -1,5 +1,37 @@
|
|||||||
# @vintl/nuxt
|
# @vintl/nuxt
|
||||||
|
|
||||||
|
## 1.4.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- e1c501c: Improve alternate links generation
|
||||||
|
|
||||||
|
Generation of `alternate` `hreflang` links has been improved to properly use absolute URLs.
|
||||||
|
|
||||||
|
Since there's no good way to know the URL of the site, there's now also `seo.baseURL` option which allows to set site's proper domain.
|
||||||
|
|
||||||
|
`hostLanguageParam` option has been deperecated in favour of `seo.hostLanguageParameter`, which functions almost the same way, except it does not accept `null`. If you want to disable generation of such tags or handle them yourself, you can set `seo.enabled` to `false`.
|
||||||
|
|
||||||
|
See [Configuration](https://vintl-nuxt.netlify.app/introduction/configuration#seooptions) documentation page for more details.
|
||||||
|
|
||||||
|
## 1.3.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 951f363: Add graceful fallback for unknown locales in storage
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- ae71089: Use automatic locale if none returned by the storage
|
||||||
|
|
||||||
|
Fixed a bug where automatic locale would not be restored from the storage properly on the next page reload, despite it being saved properly.
|
||||||
|
|
||||||
|
## 1.2.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- db449d4: Fix missing options in the newer Nuxt versions
|
||||||
|
|
||||||
## 1.2.2
|
## 1.2.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@vintl/nuxt",
|
"name": "@vintl/nuxt",
|
||||||
"version": "1.2.2",
|
"version": "1.4.0",
|
||||||
"description": "Nuxt Module for VIntl integration",
|
"description": "Nuxt Module for VIntl integration",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"i18n",
|
"i18n",
|
||||||
@@ -47,10 +47,12 @@
|
|||||||
"@vintl-dev/eslint-config-peony": "workspace:^",
|
"@vintl-dev/eslint-config-peony": "workspace:^",
|
||||||
"hookable": "^5.5.3",
|
"hookable": "^5.5.3",
|
||||||
"prettier-plugin-jsdoc": "^0.4.2",
|
"prettier-plugin-jsdoc": "^0.4.2",
|
||||||
"typescript": "^5.1.3"
|
"typescript": "^5.1.3",
|
||||||
|
"vue-router": "^4.2.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@formatjs/intl": "2.7.2",
|
"@formatjs/intl": "2.7.2",
|
||||||
|
"@formatjs/intl-localematcher": "^0.4.0",
|
||||||
"@nuxt/kit": "^3.5.3",
|
"@nuxt/kit": "^3.5.3",
|
||||||
"@vintl/unplugin": "^1.2.4",
|
"@vintl/unplugin": "^1.2.4",
|
||||||
"@vintl/vintl": "^4.2.1",
|
"@vintl/vintl": "^4.2.1",
|
||||||
@@ -61,6 +63,7 @@
|
|||||||
"pathe": "^1.1.1",
|
"pathe": "^1.1.1",
|
||||||
"picocolors": "^1.0.0",
|
"picocolors": "^1.0.0",
|
||||||
"slash": "^5.1.0",
|
"slash": "^5.1.0",
|
||||||
|
"ufo": "^1.1.2",
|
||||||
"zod": "^3.21.4"
|
"zod": "^3.21.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ const optionsFilePath = 'i18n/options.mjs'
|
|||||||
|
|
||||||
type _InputModuleOptions = typeof moduleOptionsSchema
|
type _InputModuleOptions = typeof moduleOptionsSchema
|
||||||
|
|
||||||
export interface InputModuleOptions extends t.input<_InputModuleOptions> {}
|
export interface ModuleOptions extends t.input<_InputModuleOptions> {}
|
||||||
|
|
||||||
export default defineNuxtModule<InputModuleOptions>({
|
export default defineNuxtModule<ModuleOptions>({
|
||||||
meta: {
|
meta: {
|
||||||
name: '@vintl/nuxt',
|
name: '@vintl/nuxt',
|
||||||
configKey: 'vintl',
|
configKey: 'vintl',
|
||||||
|
|||||||
@@ -1020,8 +1020,8 @@ export function generate(
|
|||||||
new ExportNamedDeclaration().setDeclaration(
|
new ExportNamedDeclaration().setDeclaration(
|
||||||
new VariableDeclaration('const', [
|
new VariableDeclaration('const', [
|
||||||
new VariableDeclarator(
|
new VariableDeclarator(
|
||||||
new Identifier('hostLanguageParam'),
|
new Identifier('seo'),
|
||||||
new Literal(opts.hostLanguageParam),
|
new Literal(null).setRaw(JSON.stringify(opts.seo)),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { useHead } from '#imports'
|
import { useHead } from '#imports'
|
||||||
import type { IntlController } from '@vintl/vintl/controller'
|
import type { IntlController } from '@vintl/vintl/controller'
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { useRouter } from 'nuxt/app'
|
import type { LocationQuery, useRouter as _useRouter$type } from 'vue-router'
|
||||||
|
import { useRouter as _useRouter, useRequestURL } from 'nuxt/app'
|
||||||
|
import { joinURL } from 'ufo'
|
||||||
|
|
||||||
type LocationQuery = ReturnType<
|
const useRouter = _useRouter as typeof _useRouter$type
|
||||||
typeof useRouter
|
|
||||||
>['currentRoute']['value']['query']
|
|
||||||
|
|
||||||
// I wish there was a better way to do this T_T
|
// I wish there was a better way to do this T_T
|
||||||
function getSeachParams(query: LocationQuery) {
|
function getSeachParams(query: LocationQuery) {
|
||||||
@@ -35,11 +35,32 @@ type LangHrefLink = {
|
|||||||
href: string
|
href: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initHead(controller: IntlController<any>, hlParam: string) {
|
interface HeadOptions {
|
||||||
|
hostLanguageParameter: string
|
||||||
|
baseURL?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export function initHead(
|
||||||
|
controller: IntlController<any>,
|
||||||
|
options: HeadOptions,
|
||||||
|
) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const currentRoute = computed(() => router.currentRoute.value)
|
const currentRoute = computed(() => router.currentRoute.value)
|
||||||
|
|
||||||
|
const requestURL = useRequestURL()
|
||||||
|
|
||||||
|
const normalizeURL = (url: string) => {
|
||||||
|
try {
|
||||||
|
return options.baseURL == null
|
||||||
|
? new URL(url, requestURL).toString()
|
||||||
|
: joinURL(options.baseURL, url)
|
||||||
|
} catch (err) {
|
||||||
|
console.error(`[vintl] cannot normalize url: ${String(err)}`)
|
||||||
|
return url
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
htmlAttrs: {
|
htmlAttrs: {
|
||||||
lang: () => controller.$config.locale,
|
lang: () => controller.$config.locale,
|
||||||
@@ -55,12 +76,12 @@ export function initHead(controller: IntlController<any>, hlParam: string) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
const sp = new URLSearchParams(query)
|
const sp = new URLSearchParams(query)
|
||||||
sp.delete(hlParam)
|
sp.delete(options.hostLanguageParameter)
|
||||||
defaultEntry = {
|
defaultEntry = {
|
||||||
// key: `hreflang-default`,
|
// key: `hreflang-default`,
|
||||||
rel: 'alternate',
|
rel: 'alternate',
|
||||||
hreflang: 'x-default',
|
hreflang: 'x-default',
|
||||||
href: withQueryParams(path, sp.toString()),
|
href: normalizeURL(withQueryParams(path, sp.toString())),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,13 +92,13 @@ export function initHead(controller: IntlController<any>, hlParam: string) {
|
|||||||
if (hrefLangs.has(hrefLang)) continue
|
if (hrefLangs.has(hrefLang)) continue
|
||||||
|
|
||||||
const sp = new URLSearchParams(query)
|
const sp = new URLSearchParams(query)
|
||||||
sp.set(hlParam, locale.tag)
|
sp.set(options.hostLanguageParameter, locale.tag)
|
||||||
|
|
||||||
hrefLangs.set(hrefLang, {
|
hrefLangs.set(hrefLang, {
|
||||||
// key: `hreflang-${locale.tag}`,
|
// key: `hreflang-${locale.tag}`,
|
||||||
rel: 'alternate',
|
rel: 'alternate',
|
||||||
hreflang: hrefLang,
|
hreflang: hrefLang,
|
||||||
href: withQueryParams(path, sp.toString()),
|
href: normalizeURL(withQueryParams(path, sp.toString())),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import {
|
|||||||
localeDefinitions,
|
localeDefinitions,
|
||||||
storageAdapterFactory,
|
storageAdapterFactory,
|
||||||
broadcastLocaleChange,
|
broadcastLocaleChange,
|
||||||
hostLanguageParam,
|
|
||||||
parserless,
|
parserless,
|
||||||
|
seo as seoOptions,
|
||||||
} from '@vintl/nuxt-runtime/options'
|
} from '@vintl/nuxt-runtime/options'
|
||||||
import type { LocaleDescriptor, MessageValueType } from '@vintl/vintl'
|
import type { LocaleDescriptor, MessageValueType } from '@vintl/vintl'
|
||||||
import type { IntlController } from '@vintl/vintl/controller'
|
import type { IntlController } from '@vintl/vintl/controller'
|
||||||
@@ -21,6 +21,7 @@ import { useAcceptLanguageHeader } from '@vintl/vintl/sources/header'
|
|||||||
import { defineNuxtPlugin } from 'nuxt/app'
|
import { defineNuxtPlugin } from 'nuxt/app'
|
||||||
import { syncCaller } from './utils/hookable.js'
|
import { syncCaller } from './utils/hookable.js'
|
||||||
import { initHead } from './head.js'
|
import { initHead } from './head.js'
|
||||||
|
import { match as matchLocales } from '@formatjs/intl-localematcher'
|
||||||
|
|
||||||
export default defineNuxtPlugin(async (nuxtApp) => {
|
export default defineNuxtPlugin(async (nuxtApp) => {
|
||||||
const locales: LocaleDescriptor[] = Object.entries(localeDefinitions).map(
|
const locales: LocaleDescriptor[] = Object.entries(localeDefinitions).map(
|
||||||
@@ -41,8 +42,8 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostLanguageParam != null) {
|
if (seoOptions.enabled) {
|
||||||
let hlLocale = nuxtApp._route.query[hostLanguageParam]
|
let hlLocale = nuxtApp._route.query[seoOptions.hostLanguageParameter]
|
||||||
|
|
||||||
if (Array.isArray(hlLocale)) {
|
if (Array.isArray(hlLocale)) {
|
||||||
hlLocale = hlLocale[0]
|
hlLocale = hlLocale[0]
|
||||||
@@ -53,12 +54,23 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (locale != null) {
|
||||||
|
const match = matchLocales(
|
||||||
|
[locale],
|
||||||
|
locales.map(({ tag }) => tag),
|
||||||
|
'en-x-placeholder',
|
||||||
|
)
|
||||||
|
|
||||||
|
locale = match == 'en-x-placeholder' ? undefined : match
|
||||||
|
}
|
||||||
|
|
||||||
const plugin = createPlugin<MessageValueType>({
|
const plugin = createPlugin<MessageValueType>({
|
||||||
injectInto: [nuxtApp],
|
injectInto: [nuxtApp],
|
||||||
controllerOpts: {
|
controllerOpts: {
|
||||||
defaultLocale,
|
defaultLocale,
|
||||||
locales,
|
locales,
|
||||||
locale,
|
locale,
|
||||||
|
usePreferredLocale: locale == null,
|
||||||
listen: {
|
listen: {
|
||||||
error(event) {
|
error(event) {
|
||||||
nuxtApp.hooks.callHookWith(syncCaller, 'i18n:error', {
|
nuxtApp.hooks.callHookWith(syncCaller, 'i18n:error', {
|
||||||
@@ -139,8 +151,8 @@ export default defineNuxtPlugin(async (nuxtApp) => {
|
|||||||
setupBroadcasting(controller)
|
setupBroadcasting(controller)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostLanguageParam != null) {
|
if (seoOptions.enabled) {
|
||||||
nuxtApp.hook('vue:setup', () => initHead(controller, hostLanguageParam!))
|
nuxtApp.hook('vue:setup', () => initHead(controller, seoOptions))
|
||||||
}
|
}
|
||||||
|
|
||||||
await nuxtApp.callHook('i18n:ready', controller)
|
await nuxtApp.callHook('i18n:ready', controller)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { z as t } from 'zod'
|
|||||||
import { tSwitch } from '../utils/zod-utils.js'
|
import { tSwitch } from '../utils/zod-utils.js'
|
||||||
import { languageTagSchema } from './language-tag.js'
|
import { languageTagSchema } from './language-tag.js'
|
||||||
import { localeDescriptorSchema } from './locales.js'
|
import { localeDescriptorSchema } from './locales.js'
|
||||||
|
import { seoOptions } from './seo.js'
|
||||||
|
|
||||||
const parselessModeEnumSchema = t.enum(['always', 'only-prod', 'never'])
|
const parselessModeEnumSchema = t.enum(['always', 'only-prod', 'never'])
|
||||||
|
|
||||||
@@ -167,6 +168,7 @@ export const moduleOptionsSchema = t
|
|||||||
* user language. `null` to disable. If this value is `null`, the SEO tags
|
* user language. `null` to disable. If this value is `null`, the SEO tags
|
||||||
* generation will be disabled.
|
* generation will be disabled.
|
||||||
*
|
*
|
||||||
|
* @deprecated Use `seo` options instead.
|
||||||
* @default 'hl' // For example, ?hl=en to use English locale (if defined).
|
* @default 'hl' // For example, ?hl=en to use English locale (if defined).
|
||||||
*/
|
*/
|
||||||
hostLanguageParam: t
|
hostLanguageParam: t
|
||||||
@@ -174,8 +176,10 @@ export const moduleOptionsSchema = t
|
|||||||
.describe(
|
.describe(
|
||||||
'Name of the host language URL parameter, used to override the default or user language.',
|
'Name of the host language URL parameter, used to override the default or user language.',
|
||||||
)
|
)
|
||||||
.nullable()
|
.optional()
|
||||||
.default('hl'),
|
.nullable(),
|
||||||
|
|
||||||
|
seo: seoOptions.optional(),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration options for the parserless mode, a mode in which the parser
|
* Configuration options for the parserless mode, a mode in which the parser
|
||||||
@@ -197,6 +201,21 @@ export const moduleOptionsSchema = t
|
|||||||
}
|
}
|
||||||
}).default('only-prod'),
|
}).default('only-prod'),
|
||||||
})
|
})
|
||||||
|
.transform((from) => {
|
||||||
|
if (from.seo === undefined) {
|
||||||
|
let hostLanguageParam = from.hostLanguageParam
|
||||||
|
if (hostLanguageParam === undefined) {
|
||||||
|
hostLanguageParam = 'hl'
|
||||||
|
}
|
||||||
|
|
||||||
|
from.seo = seoOptions.parse({
|
||||||
|
enabled: hostLanguageParam != null,
|
||||||
|
hostLanguageParameter: hostLanguageParam ?? undefined,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return from as typeof from & { seo: t.output<typeof seoOptions> }
|
||||||
|
})
|
||||||
.refine((value) => {
|
.refine((value) => {
|
||||||
return value.locales.some((locale) => locale.tag === value.defaultLocale)
|
return value.locales.some((locale) => locale.tag === value.defaultLocale)
|
||||||
}, 'Default locale must be defined')
|
}, 'Default locale must be defined')
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import { z as t } from 'zod'
|
||||||
|
|
||||||
|
export const seoOptions = t.object({
|
||||||
|
/** Whether CEO features are enabled. */
|
||||||
|
enabled: t.boolean().default(true),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the host language URL parameter, used to override the default or
|
||||||
|
* user language.
|
||||||
|
*
|
||||||
|
* @default 'hl' // For example, ?hl=en to use English locale (if defined).
|
||||||
|
*/
|
||||||
|
hostLanguageParameter: t
|
||||||
|
.string()
|
||||||
|
.describe(
|
||||||
|
'Name of the host language URL parameter, used to override the default or user language.',
|
||||||
|
)
|
||||||
|
.optional()
|
||||||
|
.default('hl'),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base URL at which the site will be available. This is required to generate
|
||||||
|
* absolute hreflang links. Without this, VIntl will try to guess the URL
|
||||||
|
* based on the server request URL / current `window.location`.
|
||||||
|
*/
|
||||||
|
baseURL: t
|
||||||
|
.string()
|
||||||
|
.describe(
|
||||||
|
'Base URL at which the site will be available. This is required to generate absolute hreflang links. ',
|
||||||
|
)
|
||||||
|
.optional(),
|
||||||
|
})
|
||||||
+27
@@ -64,4 +64,31 @@ declare module '@vintl/nuxt-runtime/options' {
|
|||||||
* descriptor.
|
* descriptor.
|
||||||
*/
|
*/
|
||||||
export const parserless: boolean
|
export const parserless: boolean
|
||||||
|
|
||||||
|
export interface SEOOptions {
|
||||||
|
/**
|
||||||
|
* Whether SEO features are enabled.
|
||||||
|
*
|
||||||
|
* @default true
|
||||||
|
*/
|
||||||
|
enabled: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the host language URL parameter, used to override the default or
|
||||||
|
* user language.
|
||||||
|
*
|
||||||
|
* @default 'hl' // For example, ?hl=en to use English locale (if defined).
|
||||||
|
*/
|
||||||
|
hostLanguageParameter: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base URL at which the site will be available. This is required to generate
|
||||||
|
* absolute hreflang links. Without this, VIntl must try to guess the URL
|
||||||
|
* based on the server request URL / current `window.location`.
|
||||||
|
*/
|
||||||
|
baseURL?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/** SEO options. */
|
||||||
|
export const seo: SEOOptions
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+37
-26
@@ -42,7 +42,7 @@ importers:
|
|||||||
version: 3.5.3
|
version: 3.5.3
|
||||||
nuxt:
|
nuxt:
|
||||||
specifier: ^3.5.3
|
specifier: ^3.5.3
|
||||||
version: 3.5.3(@types/node@20.2.5)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)
|
version: 3.5.3(@types/node@18.16.16)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)
|
||||||
theme-colors:
|
theme-colors:
|
||||||
specifier: ^0.0.5
|
specifier: ^0.0.5
|
||||||
version: 0.0.5
|
version: 0.0.5
|
||||||
@@ -69,7 +69,7 @@ importers:
|
|||||||
version: 3.5.3
|
version: 3.5.3
|
||||||
nuxt:
|
nuxt:
|
||||||
specifier: ^3.5.3
|
specifier: ^3.5.3
|
||||||
version: 3.5.3(@types/node@20.2.5)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)
|
version: 3.5.3(@types/node@18.16.16)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)
|
||||||
|
|
||||||
packages/eslint-config:
|
packages/eslint-config:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -103,6 +103,9 @@ importers:
|
|||||||
'@formatjs/intl':
|
'@formatjs/intl':
|
||||||
specifier: 2.7.2
|
specifier: 2.7.2
|
||||||
version: 2.7.2(typescript@5.1.3)
|
version: 2.7.2(typescript@5.1.3)
|
||||||
|
'@formatjs/intl-localematcher':
|
||||||
|
specifier: ^0.4.0
|
||||||
|
version: 0.4.0
|
||||||
'@nuxt/kit':
|
'@nuxt/kit':
|
||||||
specifier: ^3.5.3
|
specifier: ^3.5.3
|
||||||
version: 3.5.3(rollup@3.23.0)
|
version: 3.5.3(rollup@3.23.0)
|
||||||
@@ -133,6 +136,9 @@ importers:
|
|||||||
slash:
|
slash:
|
||||||
specifier: ^5.1.0
|
specifier: ^5.1.0
|
||||||
version: 5.1.0
|
version: 5.1.0
|
||||||
|
ufo:
|
||||||
|
specifier: ^1.1.2
|
||||||
|
version: 1.1.2
|
||||||
zod:
|
zod:
|
||||||
specifier: ^3.21.4
|
specifier: ^3.21.4
|
||||||
version: 3.21.4
|
version: 3.21.4
|
||||||
@@ -164,6 +170,9 @@ importers:
|
|||||||
typescript:
|
typescript:
|
||||||
specifier: ^5.1.3
|
specifier: ^5.1.3
|
||||||
version: 5.1.3
|
version: 5.1.3
|
||||||
|
vue-router:
|
||||||
|
specifier: ^4.2.4
|
||||||
|
version: 4.2.4(vue@3.3.4)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@@ -1026,6 +1035,12 @@ packages:
|
|||||||
tslib: 2.5.2
|
tslib: 2.5.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@formatjs/intl-localematcher@0.4.0:
|
||||||
|
resolution: {integrity: sha512-bRTd+rKomvfdS4QDlVJ6TA/Jx1F2h/TBVO5LjvhQ7QPPHp19oPNMIum7W2CMEReq/zPxpmCeB31F9+5gl/qtvw==}
|
||||||
|
dependencies:
|
||||||
|
tslib: 2.5.2
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@formatjs/intl@2.7.2(typescript@5.1.3):
|
/@formatjs/intl@2.7.2(typescript@5.1.3):
|
||||||
resolution: {integrity: sha512-ziiQfnXwY0/rXhtohSAmYMqDjRsihoMKdl8H2aA+FvxG9638E0XrvfBFCb+1HhimNiuqRz5fTY7F/bZtsJxsjA==}
|
resolution: {integrity: sha512-ziiQfnXwY0/rXhtohSAmYMqDjRsihoMKdl8H2aA+FvxG9638E0XrvfBFCb+1HhimNiuqRz5fTY7F/bZtsJxsjA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -1560,7 +1575,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-PjVETP7+iZXAs5Q8O4ivl4t6qjWZMZqwiTVogUXHoHGZZcw7GZW3u3tzfYfE1HbzyYJfr236IXqQ02MeR8Fz2w==}
|
resolution: {integrity: sha512-PjVETP7+iZXAs5Q8O4ivl4t6qjWZMZqwiTVogUXHoHGZZcw7GZW3u3tzfYfE1HbzyYJfr236IXqQ02MeR8Fz2w==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@nuxt/vite-builder@3.5.3(@types/node@20.2.5)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)(vue@3.3.4):
|
/@nuxt/vite-builder@3.5.3(@types/node@18.16.16)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-7zEKpGh3iWGRDwbWUa8eRxdLMxZtPzetelmdmXPjtYKGwUebZOcBhpeJ+VgJKOIf4OEj9E7BZS+it/Ji9UG9qw==}
|
resolution: {integrity: sha512-7zEKpGh3iWGRDwbWUa8eRxdLMxZtPzetelmdmXPjtYKGwUebZOcBhpeJ+VgJKOIf4OEj9E7BZS+it/Ji9UG9qw==}
|
||||||
engines: {node: ^14.18.0 || >=16.10.0}
|
engines: {node: ^14.18.0 || >=16.10.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -1597,8 +1612,8 @@ packages:
|
|||||||
strip-literal: 1.0.1
|
strip-literal: 1.0.1
|
||||||
ufo: 1.1.2
|
ufo: 1.1.2
|
||||||
unplugin: 1.3.1
|
unplugin: 1.3.1
|
||||||
vite: 4.3.9(@types/node@20.2.5)
|
vite: 4.3.9(@types/node@18.16.16)
|
||||||
vite-node: 0.31.4(@types/node@20.2.5)
|
vite-node: 0.31.4(@types/node@18.16.16)
|
||||||
vite-plugin-checker: 0.6.0(eslint@8.42.0)(typescript@4.9.5)(vite@4.3.9)
|
vite-plugin-checker: 0.6.0(eslint@8.42.0)(typescript@4.9.5)(vite@4.3.9)
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
vue-bundle-renderer: 1.0.3
|
vue-bundle-renderer: 1.0.3
|
||||||
@@ -1908,10 +1923,6 @@ packages:
|
|||||||
/@types/node@18.16.16:
|
/@types/node@18.16.16:
|
||||||
resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==}
|
resolution: {integrity: sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==}
|
||||||
|
|
||||||
/@types/node@20.2.5:
|
|
||||||
resolution: {integrity: sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@types/normalize-package-data@2.4.1:
|
/@types/normalize-package-data@2.4.1:
|
||||||
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
|
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
|
||||||
dev: true
|
dev: true
|
||||||
@@ -2322,7 +2333,7 @@ packages:
|
|||||||
'@babel/core': 7.21.8
|
'@babel/core': 7.21.8
|
||||||
'@babel/plugin-transform-typescript': 7.21.3(@babel/core@7.21.8)
|
'@babel/plugin-transform-typescript': 7.21.3(@babel/core@7.21.8)
|
||||||
'@vue/babel-plugin-jsx': 1.1.1(@babel/core@7.21.8)
|
'@vue/babel-plugin-jsx': 1.1.1(@babel/core@7.21.8)
|
||||||
vite: 4.3.9(@types/node@20.2.5)
|
vite: 4.3.9(@types/node@18.16.16)
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
@@ -2335,7 +2346,7 @@ packages:
|
|||||||
vite: ^4.0.0
|
vite: ^4.0.0
|
||||||
vue: ^3.2.25
|
vue: ^3.2.25
|
||||||
dependencies:
|
dependencies:
|
||||||
vite: 4.3.9(@types/node@20.2.5)
|
vite: 4.3.9(@types/node@18.16.16)
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@@ -2523,7 +2534,7 @@ packages:
|
|||||||
'@vueuse/core': 10.1.2(vue@3.3.4)
|
'@vueuse/core': 10.1.2(vue@3.3.4)
|
||||||
'@vueuse/metadata': 10.1.2
|
'@vueuse/metadata': 10.1.2
|
||||||
local-pkg: 0.4.3
|
local-pkg: 0.4.3
|
||||||
nuxt: 3.5.3(@types/node@20.2.5)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)
|
nuxt: 3.5.3(@types/node@18.16.16)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)
|
||||||
vue-demi: 0.14.5(vue@3.3.4)
|
vue-demi: 0.14.5(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@swc/core'
|
- '@swc/core'
|
||||||
@@ -6340,7 +6351,7 @@ packages:
|
|||||||
- webpack-cli
|
- webpack-cli
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/nuxt@3.5.3(@types/node@20.2.5)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5):
|
/nuxt@3.5.3(@types/node@18.16.16)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5):
|
||||||
resolution: {integrity: sha512-fG39BZ5N5ATtmx2vuxN8APQPSlSsCDpfkJ0k581gMc7eFztqrBzPncZX5w3RQLW7AiGBE2yYEfqiwC6AVODBBg==}
|
resolution: {integrity: sha512-fG39BZ5N5ATtmx2vuxN8APQPSlSsCDpfkJ0k581gMc7eFztqrBzPncZX5w3RQLW7AiGBE2yYEfqiwC6AVODBBg==}
|
||||||
engines: {node: ^14.18.0 || >=16.10.0}
|
engines: {node: ^14.18.0 || >=16.10.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -6356,8 +6367,8 @@ packages:
|
|||||||
'@nuxt/schema': 3.5.3(rollup@3.23.0)
|
'@nuxt/schema': 3.5.3(rollup@3.23.0)
|
||||||
'@nuxt/telemetry': 2.2.0(rollup@3.23.0)
|
'@nuxt/telemetry': 2.2.0(rollup@3.23.0)
|
||||||
'@nuxt/ui-templates': 1.1.1
|
'@nuxt/ui-templates': 1.1.1
|
||||||
'@nuxt/vite-builder': 3.5.3(@types/node@20.2.5)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)(vue@3.3.4)
|
'@nuxt/vite-builder': 3.5.3(@types/node@18.16.16)(eslint@8.42.0)(rollup@3.23.0)(typescript@4.9.5)(vue@3.3.4)
|
||||||
'@types/node': 20.2.5
|
'@types/node': 18.16.16
|
||||||
'@unhead/ssr': 1.1.27
|
'@unhead/ssr': 1.1.27
|
||||||
'@unhead/vue': 1.1.27(vue@3.3.4)
|
'@unhead/vue': 1.1.27(vue@3.3.4)
|
||||||
'@vue/shared': 3.3.4
|
'@vue/shared': 3.3.4
|
||||||
@@ -6396,12 +6407,12 @@ packages:
|
|||||||
unenv: 1.5.1
|
unenv: 1.5.1
|
||||||
unimport: 3.0.7(rollup@3.23.0)
|
unimport: 3.0.7(rollup@3.23.0)
|
||||||
unplugin: 1.3.1
|
unplugin: 1.3.1
|
||||||
unplugin-vue-router: 0.6.4(rollup@3.23.0)(vue-router@4.2.2)(vue@3.3.4)
|
unplugin-vue-router: 0.6.4(rollup@3.23.0)(vue-router@4.2.4)(vue@3.3.4)
|
||||||
untyped: 1.3.2
|
untyped: 1.3.2
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
vue-bundle-renderer: 1.0.3
|
vue-bundle-renderer: 1.0.3
|
||||||
vue-devtools-stub: 0.1.0
|
vue-devtools-stub: 0.1.0
|
||||||
vue-router: 4.2.2(vue@3.3.4)
|
vue-router: 4.2.4(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@azure/app-configuration'
|
- '@azure/app-configuration'
|
||||||
- '@azure/cosmos'
|
- '@azure/cosmos'
|
||||||
@@ -8561,7 +8572,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
|
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
|
||||||
engines: {node: '>= 10.0.0'}
|
engines: {node: '>= 10.0.0'}
|
||||||
|
|
||||||
/unplugin-vue-router@0.6.4(rollup@3.23.0)(vue-router@4.2.2)(vue@3.3.4):
|
/unplugin-vue-router@0.6.4(rollup@3.23.0)(vue-router@4.2.4)(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-9THVhhtbVFxbsIibjK59oPwMI1UCxRWRPX7azSkTUABsxovlOXJys5SJx0kd/0oKIqNJuYgkRfAgPuO77SqCOg==}
|
resolution: {integrity: sha512-9THVhhtbVFxbsIibjK59oPwMI1UCxRWRPX7azSkTUABsxovlOXJys5SJx0kd/0oKIqNJuYgkRfAgPuO77SqCOg==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue-router: ^4.1.0
|
vue-router: ^4.1.0
|
||||||
@@ -8581,7 +8592,7 @@ packages:
|
|||||||
pathe: 1.1.1
|
pathe: 1.1.1
|
||||||
scule: 1.0.0
|
scule: 1.0.0
|
||||||
unplugin: 1.3.1
|
unplugin: 1.3.1
|
||||||
vue-router: 4.2.2(vue@3.3.4)
|
vue-router: 4.2.4(vue@3.3.4)
|
||||||
yaml: 2.3.0
|
yaml: 2.3.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- rollup
|
- rollup
|
||||||
@@ -8738,7 +8749,7 @@ packages:
|
|||||||
vfile-message: 3.1.4
|
vfile-message: 3.1.4
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vite-node@0.31.4(@types/node@20.2.5):
|
/vite-node@0.31.4(@types/node@18.16.16):
|
||||||
resolution: {integrity: sha512-uzL377GjJtTbuc5KQxVbDu2xfU/x0wVjUtXQR2ihS21q/NK6ROr4oG0rsSkBBddZUVCwzfx22in76/0ZZHXgkQ==}
|
resolution: {integrity: sha512-uzL377GjJtTbuc5KQxVbDu2xfU/x0wVjUtXQR2ihS21q/NK6ROr4oG0rsSkBBddZUVCwzfx22in76/0ZZHXgkQ==}
|
||||||
engines: {node: '>=v14.18.0'}
|
engines: {node: '>=v14.18.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -8748,7 +8759,7 @@ packages:
|
|||||||
mlly: 1.3.0
|
mlly: 1.3.0
|
||||||
pathe: 1.1.1
|
pathe: 1.1.1
|
||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
vite: 4.3.9(@types/node@20.2.5)
|
vite: 4.3.9(@types/node@18.16.16)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@types/node'
|
- '@types/node'
|
||||||
- less
|
- less
|
||||||
@@ -8805,14 +8816,14 @@ packages:
|
|||||||
strip-ansi: 6.0.1
|
strip-ansi: 6.0.1
|
||||||
tiny-invariant: 1.3.1
|
tiny-invariant: 1.3.1
|
||||||
typescript: 4.9.5
|
typescript: 4.9.5
|
||||||
vite: 4.3.9(@types/node@20.2.5)
|
vite: 4.3.9(@types/node@18.16.16)
|
||||||
vscode-languageclient: 7.0.0
|
vscode-languageclient: 7.0.0
|
||||||
vscode-languageserver: 7.0.0
|
vscode-languageserver: 7.0.0
|
||||||
vscode-languageserver-textdocument: 1.0.8
|
vscode-languageserver-textdocument: 1.0.8
|
||||||
vscode-uri: 3.0.7
|
vscode-uri: 3.0.7
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vite@4.3.9(@types/node@20.2.5):
|
/vite@4.3.9(@types/node@18.16.16):
|
||||||
resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==}
|
resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==}
|
||||||
engines: {node: ^14.18.0 || >=16.0.0}
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -8837,7 +8848,7 @@ packages:
|
|||||||
terser:
|
terser:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.2.5
|
'@types/node': 18.16.16
|
||||||
esbuild: 0.17.19
|
esbuild: 0.17.19
|
||||||
postcss: 8.4.24
|
postcss: 8.4.24
|
||||||
rollup: 3.23.0
|
rollup: 3.23.0
|
||||||
@@ -8943,8 +8954,8 @@ packages:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
/vue-router@4.2.2(vue@3.3.4):
|
/vue-router@4.2.4(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-cChBPPmAflgBGmy3tBsjeoe3f3VOSG6naKyY5pjtrqLGbNEXdzCigFUHgBvp9e3ysAtFtEx7OLqcSDh/1Cq2TQ==}
|
resolution: {integrity: sha512-9PISkmaCO02OzPVOMq2w82ilty6+xJmQrarYZDkjZBfl4RvYAlt4PKnEX21oW4KTtWfa9OuO/b3qk1Od3AEdCQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: ^3.2.0
|
vue: ^3.2.0
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user