From 5b2bcdda3c0bb84c18fab21a060b590ca4dda753 Mon Sep 17 00:00:00 2001 From: takejohn <105504345+takejohn@users.noreply.github.com> Date: Wed, 3 Apr 2024 22:41:38 +0900 Subject: [PATCH] =?UTF-8?q?fs=E3=81=A7config=E3=82=92=E8=AA=AD=E3=81=BF?= =?UTF-8?q?=E8=BE=BC=E3=81=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 1b1989d..8e1c2e6 100644 --- a/src/config.ts +++ b/src/config.ts @@ -18,9 +18,11 @@ type Config = { }; import chalk from 'chalk'; -import uncheckedConfig from '../config.json' assert { type: 'json' }; +import fs from "fs"; import { warn } from '@/utils/log.js'; +const uncheckedConfig = JSON.parse(fs.readFileSync('./config.json', 'utf8')); + function warnWithPrefix(msg: string): void { warn(`[Config]: ${chalk.red(msg)}`); }