@dword-design/base-config-nuxt 3.0.30 → 3.0.31

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.
@@ -88,7 +88,7 @@ async function _default() {
88
88
 
89
89
  await checkNuxtI18nHead();
90
90
  await this.addModule([(0, _depcheckPackageName.default)`@nuxtjs/i18n`, {
91
- detectBrowserLanguage: {
91
+ detectBrowserLanguage: localeFiles.length === 1 ? false : {
92
92
  fallbackLocale: 'en',
93
93
  redirectOn: 'no prefix',
94
94
  useCookie: false
@@ -104,11 +104,11 @@ async function _default() {
104
104
  iso: code
105
105
  };
106
106
  })(_localeFiles)),
107
- seo: true,
108
- strategy: 'prefix',
109
- vueI18n: {
110
- fallbackLocale: 'en'
111
- },
107
+ seo: localeFiles.length > 1,
108
+ strategy: localeFiles.length === 1 ? 'no_prefix' : 'prefix',
109
+ ...(localeFiles.length === 1 && {
110
+ defaultLocale: _path.default.basename(localeFiles[0], '.json')
111
+ }),
112
112
  ...(process.env.BASE_URL && {
113
113
  baseUrl: process.env.BASE_URL
114
114
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base-config-nuxt",
3
- "version": "3.0.30",
3
+ "version": "3.0.31",
4
4
  "repository": "dword-design/base-config-nuxt",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",