Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sharp-snails-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@alauda/doom": patch
---

fix: `i18n.json` is now virtual module
7 changes: 3 additions & 4 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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)

Expand Down Expand Up @@ -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) {
Expand Down