Merge branch 'develop' into room

This commit is contained in:
syuilo 2026-05-19 15:56:21 +09:00
commit 5397beb965
2 changed files with 2 additions and 1 deletions

View file

@ -80,7 +80,7 @@ export class LocaleInliner {
await fs.mkdir(path.join(this.outputDir, localeName), { recursive: true });
const localeLogger = localeName === 'ja-JP' ? this.logger : blankLogger; // we want to log for single locale only
for (const chunk of this.chunks) {
if (!chunk.sourceCode || !chunk.modifications) {
if (chunk.sourceCode == null || !chunk.modifications) {
throw new Error(`Source code or modifications for ${chunk.fileName} is not available.`);
}
const fileLogger = localeLogger.prefixed(`${chunk.fileName} (${chunk.chunkName}): `);

View file

@ -18,6 +18,7 @@ interface WalkerContext {
}
export function collectModifications(sourceCode: string, fileName: string, fileLogger: Logger, inliner: LocaleInliner): TextModification[] {
if (sourceCode === '') return [];
let programNode: RolldownESTree.Program;
try {
programNode = parseAst(sourceCode);