@dword-design/base-config-nuxt 3.0.28 → 3.0.32

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.
@@ -12,7 +12,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
12
12
  function _default() {
13
13
  this.options.serverMiddleware.push(_bodyParser.default.urlencoded({
14
14
  extended: false
15
- }), _bodyParser.default.json());
15
+ }));
16
16
  }
17
17
 
18
18
  module.exports = exports.default;
@@ -35,7 +35,8 @@ const checkNuxtI18nHead = async () => {
35
35
  var _ref, _ref2, _layoutFiles;
36
36
 
37
37
  const layoutFiles = (_ref = (_ref2 = ['default.vue', ...(await (0, _globby.default)('*', {
38
- cwd: 'layouts'
38
+ cwd: 'layouts',
39
+ ignore: '-*'
39
40
  }))], await _ref2), (0, _uniq.default)(_ref));
40
41
 
41
42
  const checkLayoutFile = async layoutFile => {
@@ -87,7 +88,7 @@ async function _default() {
87
88
 
88
89
  await checkNuxtI18nHead();
89
90
  await this.addModule([(0, _depcheckPackageName.default)`@nuxtjs/i18n`, {
90
- detectBrowserLanguage: {
91
+ detectBrowserLanguage: localeFiles.length === 1 ? false : {
91
92
  fallbackLocale: 'en',
92
93
  redirectOn: 'no prefix',
93
94
  useCookie: false
@@ -103,11 +104,11 @@ async function _default() {
103
104
  iso: code
104
105
  };
105
106
  })(_localeFiles)),
106
- seo: true,
107
- strategy: 'prefix',
108
- vueI18n: {
109
- fallbackLocale: 'en'
110
- },
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
+ }),
111
112
  ...(process.env.BASE_URL && {
112
113
  baseUrl: process.env.BASE_URL
113
114
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base-config-nuxt",
3
- "version": "3.0.28",
3
+ "version": "3.0.32",
4
4
  "repository": "dword-design/base-config-nuxt",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",
@@ -54,11 +54,11 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@dword-design/base": "^8.0.0",
57
- "@dword-design/puppeteer": "^5.0.0",
58
- "@dword-design/tester": "^2.0.7",
57
+ "@dword-design/puppeteer": "^5.0.5",
58
+ "@dword-design/tester": "^2.0.9",
59
59
  "@dword-design/tester-plugin-env": "^2.0.8",
60
60
  "@dword-design/tester-plugin-puppeteer": "^2.1.19",
61
- "@dword-design/tester-plugin-tmp-dir": "^2.1.2",
61
+ "@dword-design/tester-plugin-tmp-dir": "^2.1.3",
62
62
  "@nuxtjs/sitemap": "^2.4.0",
63
63
  "axios": "^0.22.0",
64
64
  "depcheck": "^1.4.2",
@@ -67,7 +67,6 @@
67
67
  "postcss-hexrgba": "^2.0.0",
68
68
  "stealthy-require-no-leak": "^1.0.3",
69
69
  "tree-kill-promise": "^2.0.0",
70
- "with-local-tmp-dir": "^4.0.0",
71
70
  "xml-formatter": "^2.1.2"
72
71
  },
73
72
  "engines": {