Update config.ts
This commit is contained in:
parent
a75878fe38
commit
eb1d07cd82
|
|
@ -228,6 +228,10 @@ const dir = `${_dirname}/../../../.config`;
|
||||||
export const path = resolve(dir, '.config.json');
|
export const path = resolve(dir, '.config.json');
|
||||||
|
|
||||||
export function loadConfig(): Config {
|
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 meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8'));
|
||||||
|
|
||||||
const frontendManifestExists = fs.existsSync(_dirname + '/../../../built/_frontend_vite_/manifest.json');
|
const frontendManifestExists = fs.existsSync(_dirname + '/../../../built/_frontend_vite_/manifest.json');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue