fix: unbuild version reduced to 2.0

This commit is contained in:
vben
2024-08-03 10:12:45 +08:00
parent 27ffc9e71b
commit d3ed6757ac
8 changed files with 322 additions and 54 deletions

View File

@@ -1,4 +1,5 @@
import fs from 'node:fs';
import fsp from 'node:fs/promises';
import { join } from 'node:path';
import { fileURLToPath } from 'node:url';
@@ -62,7 +63,7 @@ async function getLoadingRawByHtmlTemplate(loadingTemplate: string) {
return;
}
const htmlRaw = fs.readFileSync(loadingPath, 'utf8');
const htmlRaw = await fsp.readFile(loadingPath, 'utf8');
return htmlRaw;
}

View File

@@ -4,7 +4,7 @@ import { join } from 'node:path';
import { fs } from '@vben/node-utils';
import * as dotenv from 'dotenv';
import dotenv from 'dotenv';
/**
* 获取当前环境下生效的配置文件名