Skip to content

Commit 853961e

Browse files
authored
fix: i18n.json is now virtual module (#80)
1 parent b1c632f commit 853961e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.changeset/sharp-snails-draw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@alauda/doom": patch
3+
---
4+
5+
fix: `i18n.json` is now virtual module

src/cli/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { green } from 'yoctocolors'
1616
import type { GlobalCliOptions, ServeOptions } from '../types.js'
1717
import { setNodeEnv } from '../utils/index.js'
1818

19-
import { CWD, DEFAULT_CONFIGS, I18N_FILE, SITES_FILE } from './constants.js'
19+
import { CWD, DEFAULT_CONFIGS, SITES_FILE } from './constants.js'
2020
import { exportCommand } from './export.js'
2121
import { parseBoolean, parseBooleanOrString } from './helpers.js'
2222
import { lintCommand } from './lint.js'
@@ -26,7 +26,7 @@ import { translateCommand } from './translate.js'
2626

2727
const META_FILE = '_meta.json'
2828

29-
const CONFIG_FILES = [...DEFAULT_CONFIGS, I18N_FILE, SITES_FILE]
29+
const CONFIG_FILES = [...DEFAULT_CONFIGS, SITES_FILE]
3030

3131
const cjsRequire = module.createRequire(import.meta.url)
3232

@@ -176,8 +176,7 @@ program
176176
eventName === 'add' ||
177177
eventName === 'unlink' ||
178178
(eventName === 'change' &&
179-
(filepath === config.i18nSourcePath ||
180-
CONFIG_FILES.includes(path.basename(filepath)) ||
179+
(CONFIG_FILES.includes(path.basename(filepath)) ||
181180
path.basename(filepath) === META_FILE))
182181
) {
183182
if (isRestarting) {

0 commit comments

Comments
 (0)