@zachhandley/ez-i18n 0.1.5 → 0.1.6

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/index.js CHANGED
@@ -361,6 +361,7 @@ export function t(key, params) {
361
361
  // HMR support for dev mode
362
362
  handleHotUpdate({ file, server }) {
363
363
  if (!isDev) return;
364
+ if (!file.endsWith(".json")) return;
364
365
  for (const info of translationInfo.values()) {
365
366
  if (info.files.includes(file)) {
366
367
  const mod = server.moduleGraph.getModuleById(RESOLVED_PREFIX + VIRTUAL_TRANSLATIONS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zachhandley/ez-i18n",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -269,6 +269,9 @@ export function t(key, params) {
269
269
  handleHotUpdate({ file, server }) {
270
270
  if (!isDev) return;
271
271
 
272
+ // Only process JSON files
273
+ if (!file.endsWith('.json')) return;
274
+
272
275
  // Check if the changed file is a translation file
273
276
  for (const info of translationInfo.values()) {
274
277
  if (info.files.includes(file)) {