@intlify/unplugin-vue-i18n 5.2.0 → 5.3.1

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/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
  [![Test](https://github.com/intlify/bundle-tools/actions/workflows/test.yml/badge.svg)](https://github.com/intlify/bundle-tools/actions/workflows/test.yml)
5
5
  [![npm](https://img.shields.io/npm/v/@intlify/unplugin-vue-i18n.svg?color=yellow)](https://www.npmjs.com/package/@intlify/unplugin-vue-i18n)
6
6
 
7
-
8
7
  unplugin for Vue I18n
9
8
 
10
9
  ## 🌟 Features
@@ -17,7 +16,6 @@ unplugin for Vue I18n
17
16
  - Locale of i18n resource definition for global scope
18
17
  - i18n resource formatting
19
18
 
20
-
21
19
  ## 💿 Installation
22
20
 
23
21
  ```sh
@@ -33,8 +31,10 @@ import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
33
31
 
34
32
  export default defineConfig({
35
33
  plugins: [
36
- VueI18nPlugin({ /* options */ }),
37
- ],
34
+ VueI18nPlugin({
35
+ /* options */
36
+ })
37
+ ]
38
38
  })
39
39
  ```
40
40
 
@@ -50,7 +50,9 @@ const VueI18nPlugin = require('@intlify/unplugin-vue-i18n/webpack')
50
50
  module.exports = {
51
51
  /* ... */
52
52
  plugins: [
53
- VueI18nPlugin({ /* options */ })
53
+ VueI18nPlugin({
54
+ /* options */
55
+ })
54
56
  ]
55
57
  }
56
58
  ```
@@ -68,14 +70,18 @@ import VueI18nPlugin from '@intlify/unplugin-vue-i18n'
68
70
  export default defineNuxtConfig({
69
71
  vite: {
70
72
  plugins: [
71
- VueI18nPlugin.vite({ /* options */ }),
72
- ],
73
+ VueI18nPlugin.vite({
74
+ /* options */
75
+ })
76
+ ]
73
77
  },
74
78
  // When using Webpack
75
79
  // builder: '@nuxt/webpack-builder',
76
80
  webpack: {
77
81
  plugins: [
78
- VueI18nPlugin.webpack({ /* options */ }),
82
+ VueI18nPlugin.webpack({
83
+ /* options */
84
+ })
79
85
  ]
80
86
  }
81
87
  })
@@ -212,6 +218,7 @@ app.use(i18n).mount('#app')
212
218
  ```
213
219
 
214
220
  Change your vite.config.ts file accordingly to import all the files from locales folder on the root. Change `'./src/locales/**'` to path of your locales.
221
+
215
222
  ```ts
216
223
  // vite.config.ts
217
224
  import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
@@ -220,11 +227,12 @@ import path from 'path'
220
227
  export default defineConfig({
221
228
  plugins: [
222
229
  VueI18nPlugin({
223
- include: [path.resolve(__dirname, './src/locales/**')],
224
- }),
225
- ],
230
+ include: [path.resolve(__dirname, './src/locales/**')]
231
+ })
232
+ ]
226
233
  })
227
234
  ```
235
+
228
236
  unplugin-vue-i18n will automatically merge locale files into `@intlify/unplugin-vue-i18n/messages`. This allows locales to be split across multiple files, for example `src/locales/fruits/en.json` and `src/locales/vegetables/en.json`.
229
237
 
230
238
  ### Types
@@ -239,7 +247,6 @@ If you want type definition of `@intlify/unplugin-vue-i18n/messages`, add `unplu
239
247
  }
240
248
  ```
241
249
 
242
-
243
250
  ## 📦 Automatic bundling
244
251
 
245
252
  ### For Vue I18n
@@ -253,7 +260,6 @@ This plugin will automatically select and bundle Vue I18n build according to the
253
260
 
254
261
  About details, See the [here](https://vue-i18n.intlify.dev/guide/advanced/optimization.html#improve-performance-and-reduce-bundle-size-with-runtime-build-only)
255
262
 
256
-
257
263
  ## 🔧 Options
258
264
 
259
265
  ### `include`
@@ -274,26 +280,23 @@ About details, See the [here](https://vue-i18n.intlify.dev/guide/advanced/optimi
274
280
 
275
281
  If nothing is specified for this option, i.e. `undefined`, nothing is done to the resource in the above format.
276
282
 
277
- > [!WARNING]
278
- `json` resources matches this option, it will be handled **before the internal json plugin of bundler, and will not be processed afterwards**, else the option doesn't match, the bundler side will handle.
283
+ > [!WARNING] > `json` resources matches this option, it will be handled **before the internal json plugin of bundler, and will not be processed afterwards**, else the option doesn't match, the bundler side will handle.
279
284
 
280
- > [!WARNING]
281
- `yaml` resources don't support multi documentation with `|`, alias with `&` and `*`, tags with `! `, `@`, etc. Only simple data structures.
285
+ > [!WARNING] > `yaml` resources don't support multi documentation with `|`, alias with `&` and `*`, tags with `! `, `@`, etc. Only simple data structures.
282
286
 
283
- > [!WARNING]
284
- `js` and `ts` resources are set **simple export (`export default`) as locale messages object, as default**.
287
+ > [!WARNING] > `js` and `ts` resources are set **simple export (`export default`) as locale messages object, as default**.
285
288
 
286
- ```js
287
- export default {
288
- hello: 'Hello, {name}!',
289
- // ...
290
- }
291
- ```
289
+ ```js
290
+ export default {
291
+ hello: 'Hello, {name}!'
292
+ // ...
293
+ }
294
+ ```
292
295
 
293
- If you need to use programmatically dynamic resource construction, you would be enable `allowDynamic` option. about details, see the section.
296
+ If you need to use programmatically dynamic resource construction, you would be enable `allowDynamic` option. about details, see the section.
294
297
 
295
298
  > [!WARNING]
296
- If you use the `js` and `ts` resources formats, set the paths, so your application code is not targeted. We recommend that resources be isolated from the application code.
299
+ > If you use the `js` and `ts` resources formats, set the paths, so your application code is not targeted. We recommend that resources be isolated from the application code.
297
300
 
298
301
  ### `module`
299
302
 
@@ -301,7 +304,7 @@ About details, See the [here](https://vue-i18n.intlify.dev/guide/advanced/optimi
301
304
  - **Default:** `'vue-i18n'`
302
305
 
303
306
  > [!NOTE]
304
- This options is supported from v5.1.0, and works with vue-i18n v10 and later.
307
+ > This options is supported from v5.1.0, and works with vue-i18n v10 and later.
305
308
 
306
309
  Bundle target vue-i18n module. You can specify either `‘vue-i18n’` or `‘petite-vue-i18n’`.
307
310
 
@@ -330,7 +333,6 @@ About details, See the [here](https://vue-i18n.intlify.dev/guide/advanced/optimi
330
333
 
331
334
  In that case, we recommend setting the `escapeHtml` option to `true`.
332
335
 
333
-
334
336
  ### `escapeHtml`
335
337
 
336
338
  - **Type:** `boolean`
@@ -340,7 +342,6 @@ About details, See the [here](https://vue-i18n.intlify.dev/guide/advanced/optimi
340
342
 
341
343
  If `strictMessage` is disabled by `false`, we recommend this option be enabled.
342
344
 
343
-
344
345
  ### `allowDynamic`
345
346
 
346
347
  - **Type:** `boolean`
@@ -367,17 +368,17 @@ About details, See the [here](https://vue-i18n.intlify.dev/guide/advanced/optimi
367
368
  - **Default:** `true`
368
369
 
369
370
  > [!IMPORTANT]
370
- 'jitCompilation' option is deprected in v5.
371
- This option will be supported with vue-i18n until v9 latest version.
371
+ > 'jitCompilation' option is deprected in v5.
372
+ > This option will be supported with vue-i18n until v9 latest version.
372
373
 
373
- Whether locale mesages should be compiled by JIT (Just in Time) compilation with vue-i18n's message compiler.
374
+ Whether locale mesages should be compiled by JIT (Just in Time) compilation with vue-i18n's message compiler.
374
375
 
375
- JIT compilation has been supported since vue-i18n v9.3. This means that since v9 was released until now, the message compiler compiles to executable JavaScript code, however it did not work in the CSP environment. Also, since this was an AOT (Ahead of Time) compilation, it was not possible to dynamically retrieve locale messages from the back-end Database and compose locale mesages with programatic.
376
+ JIT compilation has been supported since vue-i18n v9.3. This means that since v9 was released until now, the message compiler compiles to executable JavaScript code, however it did not work in the CSP environment. Also, since this was an AOT (Ahead of Time) compilation, it was not possible to dynamically retrieve locale messages from the back-end Database and compose locale mesages with programatic.
376
377
 
377
378
  > [!WARNING]
378
- Enabling JIT compilation causes the message compiler to generate AST objects for locale mesages instead of JavaScript code. If you pre-compile locale messages with a tool such as the [Intlify CLI](https://github.com/intlify/cli) and import them dynamically, you need to rebuild that resource.
379
+ > Enabling JIT compilation causes the message compiler to generate AST objects for locale mesages instead of JavaScript code. If you pre-compile locale messages with a tool such as the [Intlify CLI](https://github.com/intlify/cli) and import them dynamically, you need to rebuild that resource.
379
380
 
380
- About JIT compilation, See [here](https://vue-i18n.intlify.dev/guide/advanced/optimization.html#jit-compilation)
381
+ About JIT compilation, See [here](https://vue-i18n.intlify.dev/guide/advanced/optimization.html#jit-compilation)
381
382
 
382
383
  ### `dropMessageCompiler`
383
384
 
@@ -392,10 +393,10 @@ If do you will use this option, you need to enable `jitCompilation` option.
392
393
  > After v5 or later, this option can be set with or without `jitCompilation`.
393
394
 
394
395
  > [!NOTE]
395
- This option works with vue-i18n v9.3 and later.
396
+ > This option works with vue-i18n v9.3 and later.
396
397
 
397
398
  > [!WARNING]
398
- If you enable this option, **you should check resources in your application are pre-compiled with this plugin.** If you will be loading resources dynamically from the back-end via the API, enabling this option do not work because there is not message compiler.
399
+ > If you enable this option, **you should check resources in your application are pre-compiled with this plugin.** If you will be loading resources dynamically from the back-end via the API, enabling this option do not work because there is not message compiler.
399
400
 
400
401
  ### `ssr`
401
402
 
@@ -405,7 +406,7 @@ If do you will use this option, you need to enable `jitCompilation` option.
405
406
  Whether to bundle vue-i18n module for SSR at build time
406
407
 
407
408
  > [!NOTE]
408
- This option works with vue-i18n v9.4 and later.
409
+ > This option works with vue-i18n v9.4 and later.
409
410
 
410
411
  ### `runtimeOnly`
411
412
 
@@ -465,10 +466,38 @@ If do you will use this option, you need to enable `jitCompilation` option.
465
466
 
466
467
  ```js
467
468
  export default {
468
- "trueValue": (()=>{const fn=(ctx) => {const { normalize: _normalize } = ctx;return _normalize(["true"])};fn.source="true";return fn;})(),
469
- "falseValue": (()=>{const fn=(ctx) => {const { normalize: _normalize } = ctx;return _normalize(["false"])};fn.source="false";return fn;})(),
470
- "nullValue": (()=>{const fn=(ctx) => {const { normalize: _normalize } = ctx;return _normalize(["null"])};fn.source="null";return fn;})(),
471
- "numberValue": (()=>{const fn=(ctx) => {const { normalize: _normalize } = ctx;return _normalize(["1"])};fn.source="1";return fn;})()
469
+ trueValue: (() => {
470
+ const fn = ctx => {
471
+ const { normalize: _normalize } = ctx
472
+ return _normalize(['true'])
473
+ }
474
+ fn.source = 'true'
475
+ return fn
476
+ })(),
477
+ falseValue: (() => {
478
+ const fn = ctx => {
479
+ const { normalize: _normalize } = ctx
480
+ return _normalize(['false'])
481
+ }
482
+ fn.source = 'false'
483
+ return fn
484
+ })(),
485
+ nullValue: (() => {
486
+ const fn = ctx => {
487
+ const { normalize: _normalize } = ctx
488
+ return _normalize(['null'])
489
+ }
490
+ fn.source = 'null'
491
+ return fn
492
+ })(),
493
+ numberValue: (() => {
494
+ const fn = ctx => {
495
+ const { normalize: _normalize } = ctx
496
+ return _normalize(['1'])
497
+ }
498
+ fn.source = '1'
499
+ return fn
500
+ })()
472
501
  }
473
502
  ```
474
503
 
@@ -491,6 +520,8 @@ If do you will use this option, you need to enable `jitCompilation` option.
491
520
  On inlined `i18n` custom blocks that have specified the `lang` attribute, the `defaultSFCLang` is not applied.
492
521
 
493
522
  For example, with `defaultSFCLang: "yaml"` or `defaultSFCLang: "yml"`, this custom block:
523
+
524
+ <!-- prettier-ignore -->
494
525
  ```html
495
526
  <i18n lang="yaml">
496
527
  en:
@@ -501,6 +532,8 @@ If do you will use this option, you need to enable `jitCompilation` option.
501
532
  ```
502
533
 
503
534
  and this another one, are equivalent:
535
+
536
+ <!-- prettier-ignore -->
504
537
  ```html
505
538
  <i18n>
506
539
  en:
@@ -523,6 +556,7 @@ If do you will use this option, you need to enable `jitCompilation` option.
523
556
 
524
557
  For example, with `globalSFCScope: true`, this custom block:
525
558
 
559
+ <!-- prettier-ignore -->
526
560
  ```html
527
561
  <i18n lang="yaml" global>
528
562
  en:
@@ -534,6 +568,7 @@ If do you will use this option, you need to enable `jitCompilation` option.
534
568
 
535
569
  and this another one, are equivalent:
536
570
 
571
+ <!-- prettier-ignore -->
537
572
  ```html
538
573
  <i18n lang="yaml">
539
574
  en:
@@ -545,8 +580,9 @@ If do you will use this option, you need to enable `jitCompilation` option.
545
580
 
546
581
  You can also use `defaultSFCLang: "yaml"`, following with previous example, this another is also equivalent to previous ones:
547
582
 
583
+ <!-- prettier-ignore -->
548
584
  ```html
549
- <i18n>
585
+ <i18n>
550
586
  en:
551
587
  hello: Hello
552
588
  es:
@@ -561,9 +597,8 @@ If do you will use this option, you need to enable `jitCompilation` option.
561
597
 
562
598
  This option that to use i18n custom blocks in `vue-class-component`.
563
599
 
564
- > [!IMPORTANT]
565
- `useClassComponent` option is deprecated in v5.
566
- This option will be supported with vue-i18n until v9 latest version.
600
+ > [!IMPORTANT] > `useClassComponent` option is deprecated in v5.
601
+ > This option will be supported with vue-i18n until v9 latest version.
567
602
 
568
603
  ### `onlyLocales`
569
604
 
@@ -581,9 +616,8 @@ If do you will use this option, you need to enable `jitCompilation` option.
581
616
 
582
617
  This option allows a smooth migration from `petite-vue-i18n` to `vue-i18n` and allows progressive enhacement.
583
618
 
584
- > [!IMPORTANT]
585
- `useVueI18nImportName` option is deprecated in v5.
586
- This option will be supported with vue-i18n until v9 latest version.
619
+ > [!IMPORTANT] > `useVueI18nImportName` option is deprecated in v5.
620
+ > This option will be supported with vue-i18n until v9 latest version.
587
621
 
588
622
  ### `optimizeTranslationDirective`
589
623
 
@@ -595,7 +629,7 @@ If do you will use this option, you need to enable `jitCompilation` option.
595
629
  If you want to put it manually, you can specify the signature of the translation function as a string or a string array.
596
630
 
597
631
  > [!WARNING]
598
- About for manually signature, see the details [vue-i18n-extensions API docs](https://github.com/intlify/vue-i18n-extensions/blob/next/docs/%40intlify/vue-i18n-extensions-api.md#translationsignatures) and [usecase from vue-i18n-extensions PR](https://github.com/intlify/vue-i18n-extensions/pull/217/files#diff-3fb9543f91e011d4b0dc9beff44082fe1a99c9eab70c1afab23c3c34352b7c38R121-R200)
632
+ > About for manually signature, see the details [vue-i18n-extensions API docs](https://github.com/intlify/vue-i18n-extensions/blob/next/docs/%40intlify/vue-i18n-extensions-api.md#translationsignatures) and [usecase from vue-i18n-extensions PR](https://github.com/intlify/vue-i18n-extensions/pull/217/files#diff-3fb9543f91e011d4b0dc9beff44082fe1a99c9eab70c1afab23c3c34352b7c38R121-R200)
599
633
 
600
634
  ### `transformI18nBlock`
601
635
 
@@ -605,6 +639,7 @@ If do you will use this option, you need to enable `jitCompilation` option.
605
639
  This hook allows a user to modify the `<i18n>` block before the plugin generates the translations. The hook is passed the source of the `<ii8n>` block as a `string` after the SFC is read from disk.
606
640
 
607
641
  **Plugin**
642
+
608
643
  ```javascript
609
644
  function transformI18nBlock(source) {
610
645
  // transformation logic
@@ -617,32 +652,37 @@ If do you will use this option, you need to enable `jitCompilation` option.
617
652
  ```
618
653
 
619
654
  **Before**
655
+
656
+ <!-- prettier-ignore -->
620
657
  ```html
621
658
  <i18n>
622
659
  [
623
- 'slug-one',
624
- 'slug-two'
660
+ 'slug-one',
661
+ 'slug-two'
625
662
  ]
626
- <i18n>
663
+ </i18n>
627
664
  ```
628
665
 
629
666
  **After**
667
+
668
+ <!-- prettier-ignore -->
630
669
  ```html
631
670
  <i18n>
632
671
  {
633
- 'en': {
634
- 'slug-one': 'foo',
635
- 'slug-two': 'bar'
636
- },
637
- ja: {
638
- 'slug-one': 'foo',
639
- 'slug-two': 'bar'
640
- }
672
+ 'en': {
673
+ 'slug-one': 'foo',
674
+ 'slug-two': 'bar'
675
+ },
676
+ ja: {
677
+ 'slug-one': 'foo',
678
+ 'slug-two': 'bar'
679
+ }
641
680
  }
642
681
  </i18n>
643
682
  ```
683
+
644
684
  > [!IMPORTANT]
645
- The function **must** return a string or the build will fail.
685
+ > The function **must** return a string or the build will fail.
646
686
 
647
687
  ## 📜 Changelog
648
688
 
package/lib/index.cjs CHANGED
@@ -8,10 +8,10 @@ const pc = require('picocolors');
8
8
  const path = require('node:path');
9
9
  const pathe = require('pathe');
10
10
  const shared = require('@intlify/shared');
11
+ const bundleUtils = require('@intlify/bundle-utils');
12
+ const pluginutils = require('@rollup/pluginutils');
11
13
  const fg = require('fast-glob');
12
14
  const node_fs = require('node:fs');
13
- const pluginutils = require('@rollup/pluginutils');
14
- const bundleUtils = require('@intlify/bundle-utils');
15
15
  const compilerSfc = require('vue/compiler-sfc');
16
16
  const vueI18nExtensions = require('@intlify/vue-i18n-extensions');
17
17
  const scopeManager = require('@typescript-eslint/scope-manager');
@@ -383,7 +383,6 @@ function resourcePlugin({
383
383
  return asVirtualId(id, meta.framework);
384
384
  }
385
385
  },
386
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
387
386
  async load(id) {
388
387
  debug$2("load", id);
389
388
  if (INTLIFY_BUNDLE_IMPORT_ID === getVirtualId(id, meta.framework) && include) {
@@ -539,7 +538,7 @@ async function loadWebpack() {
539
538
  let webpack = null;
540
539
  try {
541
540
  webpack = await import('webpack').then((m) => m.default || m);
542
- } catch (e) {
541
+ } catch (_e) {
543
542
  warn(`webpack not found, please install webpack.`);
544
543
  }
545
544
  return webpack;
@@ -704,6 +703,7 @@ function directivePlugin({
704
703
  }) {
705
704
  let vuePlugin = null;
706
705
  let vuePluginOptions = null;
706
+ const excludeLangs = ["pug", "jsx", "tsx"];
707
707
  return {
708
708
  name: resolveNamespace("directive"),
709
709
  enforce: "pre",
@@ -730,18 +730,23 @@ function directivePlugin({
730
730
  }
731
731
  },
732
732
  async transform(code, id) {
733
- const { filename } = parseVueRequest(id);
734
- if (vuePluginOptions == null) {
735
- vuePluginOptions = getVuePluginOptions(vuePlugin);
736
- }
737
733
  if (id.endsWith(".vue")) {
738
- analyzeIdentifiers(
739
- getDescriptor(filename, code, vuePluginOptions),
740
- vuePluginOptions,
741
- translationIdentifiers
742
- );
734
+ const { filename, query } = parseVueRequest(id);
735
+ if (!excludeLangs.includes(query.lang ?? "")) {
736
+ if (vuePluginOptions == null) {
737
+ vuePluginOptions = getVuePluginOptions(vuePlugin);
738
+ }
739
+ analyzeIdentifiers(
740
+ getDescriptor(filename, code, vuePluginOptions),
741
+ vuePluginOptions,
742
+ translationIdentifiers
743
+ );
744
+ }
743
745
  }
744
- return code;
746
+ return {
747
+ code,
748
+ map: { version: 3, mappings: "", sources: [] }
749
+ };
745
750
  }
746
751
  };
747
752
  }
package/lib/index.mjs CHANGED
@@ -4,10 +4,10 @@ import pc from 'picocolors';
4
4
  import path from 'node:path';
5
5
  import { normalize, parse } from 'pathe';
6
6
  import { isArray, isString, isBoolean, assign, isNumber, isEmptyObject, generateCodeFrame } from '@intlify/shared';
7
+ import { generateJSON, generateYAML, generateJavaScript } from '@intlify/bundle-utils';
8
+ import { createFilter } from '@rollup/pluginutils';
7
9
  import fg from 'fast-glob';
8
10
  import { promises } from 'node:fs';
9
- import { createFilter } from '@rollup/pluginutils';
10
- import { generateJSON, generateYAML, generateJavaScript } from '@intlify/bundle-utils';
11
11
  import { parse as parse$1 } from 'vue/compiler-sfc';
12
12
  import { transformVTDirective } from '@intlify/vue-i18n-extensions';
13
13
  import { analyze } from '@typescript-eslint/scope-manager';
@@ -371,7 +371,6 @@ function resourcePlugin({
371
371
  return asVirtualId(id, meta.framework);
372
372
  }
373
373
  },
374
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
375
374
  async load(id) {
376
375
  debug$2("load", id);
377
376
  if (INTLIFY_BUNDLE_IMPORT_ID === getVirtualId(id, meta.framework) && include) {
@@ -527,7 +526,7 @@ async function loadWebpack() {
527
526
  let webpack = null;
528
527
  try {
529
528
  webpack = await import('webpack').then((m) => m.default || m);
530
- } catch (e) {
529
+ } catch (_e) {
531
530
  warn(`webpack not found, please install webpack.`);
532
531
  }
533
532
  return webpack;
@@ -692,6 +691,7 @@ function directivePlugin({
692
691
  }) {
693
692
  let vuePlugin = null;
694
693
  let vuePluginOptions = null;
694
+ const excludeLangs = ["pug", "jsx", "tsx"];
695
695
  return {
696
696
  name: resolveNamespace("directive"),
697
697
  enforce: "pre",
@@ -718,18 +718,23 @@ function directivePlugin({
718
718
  }
719
719
  },
720
720
  async transform(code, id) {
721
- const { filename } = parseVueRequest(id);
722
- if (vuePluginOptions == null) {
723
- vuePluginOptions = getVuePluginOptions(vuePlugin);
724
- }
725
721
  if (id.endsWith(".vue")) {
726
- analyzeIdentifiers(
727
- getDescriptor(filename, code, vuePluginOptions),
728
- vuePluginOptions,
729
- translationIdentifiers
730
- );
722
+ const { filename, query } = parseVueRequest(id);
723
+ if (!excludeLangs.includes(query.lang ?? "")) {
724
+ if (vuePluginOptions == null) {
725
+ vuePluginOptions = getVuePluginOptions(vuePlugin);
726
+ }
727
+ analyzeIdentifiers(
728
+ getDescriptor(filename, code, vuePluginOptions),
729
+ vuePluginOptions,
730
+ translationIdentifiers
731
+ );
732
+ }
731
733
  }
732
- return code;
734
+ return {
735
+ code,
736
+ map: { version: 3, mappings: "", sources: [] }
737
+ };
733
738
  }
734
739
  };
735
740
  }
package/lib/vite.cjs CHANGED
@@ -7,10 +7,10 @@ require('picocolors');
7
7
  require('node:path');
8
8
  require('pathe');
9
9
  require('@intlify/shared');
10
+ require('@intlify/bundle-utils');
11
+ require('@rollup/pluginutils');
10
12
  require('fast-glob');
11
13
  require('node:fs');
12
- require('@rollup/pluginutils');
13
- require('@intlify/bundle-utils');
14
14
  require('vue/compiler-sfc');
15
15
  require('@intlify/vue-i18n-extensions');
16
16
  require('@typescript-eslint/scope-manager');
package/lib/vite.mjs CHANGED
@@ -5,10 +5,10 @@ import 'picocolors';
5
5
  import 'node:path';
6
6
  import 'pathe';
7
7
  import '@intlify/shared';
8
+ import '@intlify/bundle-utils';
9
+ import '@rollup/pluginutils';
8
10
  import 'fast-glob';
9
11
  import 'node:fs';
10
- import '@rollup/pluginutils';
11
- import '@intlify/bundle-utils';
12
12
  import 'vue/compiler-sfc';
13
13
  import '@intlify/vue-i18n-extensions';
14
14
  import '@typescript-eslint/scope-manager';
package/lib/webpack.cjs CHANGED
@@ -7,10 +7,10 @@ require('picocolors');
7
7
  require('node:path');
8
8
  require('pathe');
9
9
  require('@intlify/shared');
10
+ require('@intlify/bundle-utils');
11
+ require('@rollup/pluginutils');
10
12
  require('fast-glob');
11
13
  require('node:fs');
12
- require('@rollup/pluginutils');
13
- require('@intlify/bundle-utils');
14
14
  require('vue/compiler-sfc');
15
15
  require('@intlify/vue-i18n-extensions');
16
16
  require('@typescript-eslint/scope-manager');
package/lib/webpack.mjs CHANGED
@@ -5,10 +5,10 @@ import 'picocolors';
5
5
  import 'node:path';
6
6
  import 'pathe';
7
7
  import '@intlify/shared';
8
+ import '@intlify/bundle-utils';
9
+ import '@rollup/pluginutils';
8
10
  import 'fast-glob';
9
11
  import 'node:fs';
10
- import '@rollup/pluginutils';
11
- import '@intlify/bundle-utils';
12
12
  import 'vue/compiler-sfc';
13
13
  import '@intlify/vue-i18n-extensions';
14
14
  import '@typescript-eslint/scope-manager';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlify/unplugin-vue-i18n",
3
- "version": "5.2.0",
3
+ "version": "5.3.1",
4
4
  "description": "unplugin for Vue I18n",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@eslint-community/eslint-utils": "^4.4.0",
27
- "@intlify/bundle-utils": "^9.0.0-beta.0",
28
- "@intlify/shared": "next",
27
+ "@intlify/bundle-utils": "^9.0.0",
28
+ "@intlify/shared": "latest",
29
29
  "@intlify/vue-i18n-extensions": "^7.0.0",
30
30
  "@rollup/pluginutils": "^5.1.0",
31
- "@typescript-eslint/scope-manager": "^7.13.0",
32
- "@typescript-eslint/typescript-estree": "^7.13.0",
31
+ "@typescript-eslint/scope-manager": "^8.13.0",
32
+ "@typescript-eslint/typescript-estree": "^8.13.0",
33
33
  "debug": "^4.3.3",
34
34
  "fast-glob": "^3.2.12",
35
35
  "js-yaml": "^4.1.0",