fix: meta.jsonをimportしないように

Fix #7671
This commit is contained in:
syuilo 2021-08-20 21:34:56 +09:00
parent 1ffee15b83
commit 3cb5ed167a
3 changed files with 13 additions and 2 deletions

View file

@ -7,7 +7,6 @@ import { fileURLToPath } from 'url';
import { dirname } from 'path';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types';
import * as meta from '../meta.json';
//const _filename = fileURLToPath(import.meta.url);
const _filename = __filename;
@ -26,6 +25,7 @@ const path = process.env.NODE_ENV === 'test'
: `${dir}/default.yml`;
export default function load() {
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../meta.json`, 'utf-8'));
const config = yaml.load(fs.readFileSync(path, 'utf-8')) as Source;
const mixin = {} as Mixin;