使用export = 替换export default

This commit is contained in:
undefined committed 2020-08-21 20:07:23 +08:00
1 parent 12af2f7542
commit c63643d349
15 files changed
+38 -25

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ import fs from 'fs';
import os from 'os';
import path from 'path';
export default function load() {
export = function load() {
let f = path.resolve(process.cwd(), 'config.json');
if (!fs.existsSync(f)) f = path.resolve(__dirname, 'config.json');
if (!fs.existsSync(f)) f = path.resolve(os.homedir(), '.config', 'hydro', 'config.json');