@merkaly/nuxt 0.7.8 → 0.7.9

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.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { ClientAuthorizationParams } from '@auth0/auth0-spa-js';
3
+ import { Strategies } from '@nuxtjs/i18n';
3
4
  export { AdapterArgs, AdapterOptions } from '../dist/runtime/utils/withAdapter.js';
4
5
  export { ApiOptions, HooksOptions, ParamsOptions, RefOptions } from '../dist/runtime/plugins/api.global.js';
5
6
 
@@ -27,6 +28,13 @@ interface MerkalyModuleOptions {
27
28
  i18n?: {
28
29
  defaultLocale: string;
29
30
  locales: MerkalyI18nLocale[];
31
+ /**
32
+ * URL routing strategy. Defaults to `'no_prefix'` so existing projects keep
33
+ * their current behavior (no locale segment in the URL). Set to a prefix
34
+ * variant to expose a locale segment (e.g. `/es/about`) without translating
35
+ * the route paths.
36
+ */
37
+ strategy?: Strategies;
30
38
  };
31
39
  plausible?: {
32
40
  domain: string;
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.14.0"
6
6
  },
7
- "version": "0.7.8",
7
+ "version": "0.7.9",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -27,7 +27,8 @@ const defaultOptions = {
27
27
  },
28
28
  i18n: {
29
29
  defaultLocale: "en-US",
30
- locales: []
30
+ locales: [],
31
+ strategy: "no_prefix"
31
32
  },
32
33
  plausible: {
33
34
  domain: "",
@@ -117,7 +118,7 @@ function configureI18n(nuxt, options) {
117
118
  defaultLocale: options.i18n.defaultLocale,
118
119
  detectBrowserLanguage: { useCookie: true },
119
120
  restructureDir: ".",
120
- strategy: "no_prefix",
121
+ strategy: options.i18n.strategy ?? "no_prefix",
121
122
  vueI18n
122
123
  };
123
124
  }
@@ -193,7 +194,13 @@ function configureFontAwesome(nuxt) {
193
194
  }
194
195
  function configureVite(nuxt) {
195
196
  nuxt.options.vite = defu(nuxt.options.vite || {}, {
196
- plugins: [svgLoader()]
197
+ plugins: [svgLoader()],
198
+ // Force a single shared notivue instance so consumers don't have to declare
199
+ // `vite.resolve.dedupe: ['notivue']` themselves (avoids the duplicate-instance
200
+ // `useNotivueInstance()` error, especially when @merkaly/nuxt is linked locally).
201
+ resolve: {
202
+ dedupe: ["notivue"]
203
+ }
197
204
  });
198
205
  }
199
206
  function configureNuxtOptions(nuxt, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/nuxt",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/merkaly-io/nuxt.git"