Update config.ts

This commit is contained in:
syuilo 2025-12-03 18:33:15 +09:00
parent a75878fe38
commit eb1d07cd82
1 changed files with 4 additions and 0 deletions

View File

@ -228,6 +228,10 @@ const dir = `${_dirname}/../../../.config`;
export const path = resolve(dir, '.config.json');
export function loadConfig(): Config {
if (!fs.existsSync(path)) {
throw new Error('Compiled configuration file not found. Try running \'pnpm convert:config\'.');
}
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8'));
const frontendManifestExists = fs.existsSync(_dirname + '/../../../built/_frontend_vite_/manifest.json');