mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
scripts: fix tar esm issue (#48442)
* Update build.ts Signed-off-by: vagusX <vagusxl@gmail.com> * Update build.ts Signed-off-by: vagusX <vagusxl@gmail.com> --------- Signed-off-by: vagusX <vagusxl@gmail.com>
This commit is contained in:
parent
72b5263344
commit
0072587f14
@ -16,7 +16,6 @@ import { remark } from 'remark';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import remarkHtml from 'remark-html';
|
||||
import sharp from 'sharp';
|
||||
import tar from 'tar';
|
||||
|
||||
const ROOT_DIR = process.cwd();
|
||||
const ALI_OSS_BUCKET = 'antd-visual-diff';
|
||||
@ -106,6 +105,7 @@ async function getBranchLatestRef(branchName: string) {
|
||||
}
|
||||
|
||||
async function downloadBaseSnapshots(ref: string, targetDir: string) {
|
||||
const tar = await import('tar');
|
||||
// download imageSnapshotsUrl
|
||||
const imageSnapshotsUrl = `${ossDomain}/${ref}/imageSnapshots.tar.gz`;
|
||||
const targzPath = path.resolve(os.tmpdir(), `./${path.basename(targetDir)}.tar.gz`);
|
||||
@ -350,7 +350,7 @@ async function boot() {
|
||||
htmlTemplate.replace('{{reportContent}}', reportHtmlStr),
|
||||
'utf-8',
|
||||
);
|
||||
|
||||
const tar = await import('tar');
|
||||
await tar.c(
|
||||
{
|
||||
gzip: true,
|
||||
|
Loading…
Reference in New Issue
Block a user