@intlify/unplugin-vue-i18n 0.6.2 → 0.7.0
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/CHANGELOG.md +9 -0
- package/lib/index.cjs +11 -0
- package/lib/index.mjs +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
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
|
+
|
|
2
11
|
## @intlify/unplugin-vue-i18n@0.6.2 (2022-09-27)
|
|
3
12
|
|
|
4
13
|
#### :bug: Bug Fixes
|
package/lib/index.cjs
CHANGED
|
@@ -203,6 +203,17 @@ const unplugin = unplugin$1.createUnplugin((options = {}, meta) => {
|
|
|
203
203
|
return orgTransform.apply(this, [code, id]);
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
+
},
|
|
207
|
+
async handleHotUpdate({ file, server }) {
|
|
208
|
+
if (/\.(json5?|ya?ml)$/.test(file)) {
|
|
209
|
+
const module = server.moduleGraph.getModuleById(
|
|
210
|
+
asVirtualId(INTLIFY_BUNDLE_IMPORT_ID, meta.framework)
|
|
211
|
+
);
|
|
212
|
+
if (module) {
|
|
213
|
+
server.moduleGraph.invalidateModule(module);
|
|
214
|
+
return [module];
|
|
215
|
+
}
|
|
216
|
+
}
|
|
206
217
|
}
|
|
207
218
|
},
|
|
208
219
|
webpack(compiler) {
|
package/lib/index.mjs
CHANGED
|
@@ -191,6 +191,17 @@ const unplugin = createUnplugin((options = {}, meta) => {
|
|
|
191
191
|
return orgTransform.apply(this, [code, id]);
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
+
},
|
|
195
|
+
async handleHotUpdate({ file, server }) {
|
|
196
|
+
if (/\.(json5?|ya?ml)$/.test(file)) {
|
|
197
|
+
const module = server.moduleGraph.getModuleById(
|
|
198
|
+
asVirtualId(INTLIFY_BUNDLE_IMPORT_ID, meta.framework)
|
|
199
|
+
);
|
|
200
|
+
if (module) {
|
|
201
|
+
server.moduleGraph.invalidateModule(module);
|
|
202
|
+
return [module];
|
|
203
|
+
}
|
|
204
|
+
}
|
|
194
205
|
}
|
|
195
206
|
},
|
|
196
207
|
webpack(compiler) {
|