From 109042e0fa3d3b8727e6937fbe81f25ccfa1eb32 Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 9 Jun 2025 17:59:49 +0800 Subject: [PATCH 1/2] fix: `i18n.json` is now virtual module --- src/cli/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/cli/index.ts b/src/cli/index.ts index 47ed38bc..e58641ad 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -16,7 +16,7 @@ import { green } from 'yoctocolors' import type { GlobalCliOptions, ServeOptions } from '../types.js' import { setNodeEnv } from '../utils/index.js' -import { CWD, DEFAULT_CONFIGS, I18N_FILE, SITES_FILE } from './constants.js' +import { CWD, DEFAULT_CONFIGS, SITES_FILE } from './constants.js' import { exportCommand } from './export.js' import { parseBoolean, parseBooleanOrString } from './helpers.js' import { lintCommand } from './lint.js' @@ -26,7 +26,7 @@ import { translateCommand } from './translate.js' const META_FILE = '_meta.json' -const CONFIG_FILES = [...DEFAULT_CONFIGS, I18N_FILE, SITES_FILE] +const CONFIG_FILES = [...DEFAULT_CONFIGS, SITES_FILE] const cjsRequire = module.createRequire(import.meta.url) @@ -176,8 +176,7 @@ program eventName === 'add' || eventName === 'unlink' || (eventName === 'change' && - (filepath === config.i18nSourcePath || - CONFIG_FILES.includes(path.basename(filepath)) || + (CONFIG_FILES.includes(path.basename(filepath)) || path.basename(filepath) === META_FILE)) ) { if (isRestarting) { From ea076abd5999bfe163eec68583f39af80482160b Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 9 Jun 2025 18:02:30 +0800 Subject: [PATCH 2/2] Create sharp-snails-draw.md Signed-off-by: JounQin --- .changeset/sharp-snails-draw.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/sharp-snails-draw.md diff --git a/.changeset/sharp-snails-draw.md b/.changeset/sharp-snails-draw.md new file mode 100644 index 00000000..161f56e1 --- /dev/null +++ b/.changeset/sharp-snails-draw.md @@ -0,0 +1,5 @@ +--- +"@alauda/doom": patch +--- + +fix: `i18n.json` is now virtual module