@intlify/unplugin-vue-i18n 0.7.0 → 0.7.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
@@ -252,7 +252,7 @@ This plugin will automatically select and bundle `petite-vue-i18n` build accordi
252
252
  - **Type:** `string | string[] | undefined`
253
253
  - **Default:** `undefined`
254
254
 
255
- A [minimatch](https://github.com/isaacs/minimatch) pattern, or array of patterns, you can specify a path to pre-compile i18n resources files. The extensions of i18n resources to be precompiled are as follows:
255
+ A [picomatch](https://github.com/micromatch/picomatch) pattern, or array of patterns, you can specify a path to pre-compile i18n resources files. The extensions of i18n resources to be precompiled are as follows:
256
256
 
257
257
  ```
258
258
  - json
@@ -263,6 +263,8 @@ This plugin will automatically select and bundle `petite-vue-i18n` build accordi
263
263
 
264
264
  Note `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.
265
265
 
266
+ If nothing is specified for this option, i.e. `undefined`, nothing is done to the resource in the above format.
267
+
266
268
  ### `runtimeOnly`
267
269
 
268
270
  - **Type:** `boolean`
package/lib/index.cjs CHANGED
@@ -109,14 +109,17 @@ const unplugin = unplugin$1.createUnplugin((options = {}, meta) => {
109
109
  raiseError(`This plugin is supported 'vite' and 'webpack' only`);
110
110
  }
111
111
  let include = options.include;
112
+ let exclude = null;
112
113
  if (include) {
113
114
  if (shared.isArray(include)) {
114
115
  include = include.map((item) => pathe.normalize(item));
115
116
  } else if (shared.isString(include)) {
116
117
  include = pathe.normalize(include);
117
118
  }
119
+ } else {
120
+ exclude = "**/**";
118
121
  }
119
- const filter = pluginutils.createFilter(include);
122
+ const filter = pluginutils.createFilter(include, exclude);
120
123
  const forceStringify = !!options.forceStringify;
121
124
  const defaultSFCLang = shared.isString(options.defaultSFCLang) ? options.defaultSFCLang : "json";
122
125
  const globalSFCScope = !!options.globalSFCScope;
package/lib/index.mjs CHANGED
@@ -97,14 +97,17 @@ const unplugin = createUnplugin((options = {}, meta) => {
97
97
  raiseError(`This plugin is supported 'vite' and 'webpack' only`);
98
98
  }
99
99
  let include = options.include;
100
+ let exclude = null;
100
101
  if (include) {
101
102
  if (isArray(include)) {
102
103
  include = include.map((item) => normalize(item));
103
104
  } else if (isString(include)) {
104
105
  include = normalize(include);
105
106
  }
107
+ } else {
108
+ exclude = "**/**";
106
109
  }
107
- const filter = createFilter(include);
110
+ const filter = createFilter(include, exclude);
108
111
  const forceStringify = !!options.forceStringify;
109
112
  const defaultSFCLang = isString(options.defaultSFCLang) ? options.defaultSFCLang : "json";
110
113
  const globalSFCScope = !!options.globalSFCScope;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlify/unplugin-vue-i18n",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "unplugin for Vue I18n",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
package/CHANGELOG.md DELETED
@@ -1,121 +0,0 @@
1
-
2
- ## @intlify/unplugin-vue-i18n@0.7.0 (2022-09-27)
3
-
4
- #### :star: Features
5
- * [#189](https://github.com/intlify/bundle-tools/pull/189) fix(unplugin-vue-i18n): support HMR for vite ([@kazupon](https://github.com/kazupon))
6
-
7
- #### Committers: 1
8
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
9
-
10
-
11
- ## @intlify/unplugin-vue-i18n@0.6.2 (2022-09-27)
12
-
13
- #### :bug: Bug Fixes
14
- * [#187](https://github.com/intlify/bundle-tools/pull/187) fix(unplugin-vue-i18n): cannot set vue-i18n-bridge dist path ([@kazupon](https://github.com/kazupon))
15
-
16
- #### Committers: 1
17
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
18
-
19
-
20
- ## @intlify/unplugin-vue-i18n@0.6.1 (2022-09-26)
21
-
22
- #### :zap: Improvement Features
23
- * [#184](https://github.com/intlify/bundle-tools/pull/184) fix(unplugin-vue-i18n): port vue-i18n-bridge module detecting from vite-plugin-vue-i18n ([@kazupon](https://github.com/kazupon))
24
-
25
- #### Committers: 1
26
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
27
-
28
-
29
- ## @intlify/unplugin-vue-i18n@0.6.0 (2022-09-19)
30
-
31
- #### :bug: Bug Fixes
32
- * [#180](https://github.com/intlify/bundle-tools/pull/180) fix(unplugin-vue-i18n): improve compilation error handling ([@kazupon](https://github.com/kazupon))
33
-
34
- #### Committers: 1
35
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
36
-
37
-
38
- ## @intlify/unplugin-vue-i18n@0.5.0 (2022-07-26)
39
-
40
- #### :star: Features
41
- * [#156](https://github.com/intlify/bundle-tools/pull/156) feat(unplugin-vue-i18n): support petite-vue-i18n and useVueI18nImportName option ([@kazupon](https://github.com/kazupon))
42
-
43
- #### :zap: Improvement Features
44
- * [#155](https://github.com/intlify/bundle-tools/pull/155) fix(unplugin-vue-i18n): improve wrong virtual module implementation ([@kazupon](https://github.com/kazupon))
45
- * [#154](https://github.com/intlify/bundle-tools/pull/154) fix(unplugin-vue-i18n): support unplugin v0.8 ([@kazupon](https://github.com/kazupon))
46
-
47
- #### Committers: 1
48
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
49
-
50
-
51
- ## @intlify/unplugin-vue-i18n@0.4.0 (2022-07-07)
52
-
53
- #### :star: Features
54
- * [#138](https://github.com/intlify/bundle-tools/pull/138) feat(unplugin-vue-i18n): support esm options for bridge ([@kazupon](https://github.com/kazupon))
55
-
56
- #### Committers: 1
57
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
58
-
59
-
60
- ## @intlify/unplugin-vue-i18n@0.3.0 (2022-07-07)
61
-
62
- #### :star: Features
63
- * [#136](https://github.com/intlify/bundle-tools/pull/136) feat(unplugin-vue-i18n): support fullinstall option ([@kazupon](https://github.com/kazupon))
64
- * [#135](https://github.com/intlify/bundle-tools/pull/135) feat(unplugin-vue-i18n): support composition only option ([@kazupon](https://github.com/kazupon))
65
- * [#134](https://github.com/intlify/bundle-tools/pull/134) feat(unplugin-vue-i18n): support runtimeOnly option ([@kazupon](https://github.com/kazupon))
66
-
67
- #### :pencil: Documentation
68
- * [#133](https://github.com/intlify/bundle-tools/pull/133) docs: consistent plugin name and add Nuxt ([@Atinux](https://github.com/Atinux))
69
-
70
- #### Committers: 2
71
- - Sébastien Chopin ([@Atinux](https://github.com/Atinux))
72
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
73
-
74
-
75
- ## @intlify/unplugin-vue-i18n@0.2.1 (2022-05-07)
76
-
77
- #### :bug: Bug Fixes
78
- * [#118](https://github.com/intlify/bundle-tools/pull/118) fix(unplugin-vue-i18n): code transforming strictly ([@kazupon](https://github.com/kazupon))
79
-
80
- #### Committers: 1
81
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
82
-
83
-
84
- ## @intlify/unplugin-vue-i18n@0.2.0 (2022-05-06)
85
-
86
- #### :star: Features
87
- * [#117](https://github.com/intlify/bundle-tools/pull/117) feat: support virtual resource importing ([@kazupon](https://github.com/kazupon))
88
-
89
- #### Committers: 1
90
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
91
-
92
-
93
- ## @intlify/unplugin-vue-i18n@0.1.2 (2022-05-06)
94
-
95
- #### :bug: Bug Fixes
96
- * [#115](https://github.com/intlify/bundle-tools/pull/115) fix(unplugin-vue-i18n): export d.ts files ([@kazupon](https://github.com/kazupon))
97
-
98
- #### Committers: 1
99
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
100
-
101
-
102
- ## @intlify/unplugin-vue-i18n@0.1.1 (2022-05-06)
103
-
104
- #### :bug: Bug Fixes
105
- * [#114](https://github.com/intlify/bundle-tools/pull/114) fix(unplugin-vue-i18n): export types ([@kazupon](https://github.com/kazupon))
106
-
107
- #### Committers: 1
108
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
109
-
110
-
111
- ## @intlify/unplugin-vue-i18n@0.1.0 (2022-05-06)
112
-
113
- #### :star: Features
114
- * [#113](https://github.com/intlify/bundle-tools/pull/113) feat: unplugin basic implementation for vue-i18n ([@kazupon](https://github.com/kazupon))
115
-
116
- #### Committers: 1
117
- - kazuya kawaguchi ([@kazupon](https://github.com/kazupon))
118
-
119
- ## @intlify/unplugin-vue-i18n@0.0.0 (2022-05-02)
120
-
121
- :tada: Initial release.