Skip to content

Commit 5fc3343

Browse files
committed
fix: pnpm安装时,相同的文件会使用同一个inode变成硬链接
1 parent f6c7596 commit 5fc3343

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

scripts/build-success.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ echo '{"type":"module"}' > dist/esm/package.json
77
cp dist/index.js dist/backup-index.js
88
cp dist/index.d.ts dist/backup-index.d.ts
99
cp dist/esm/index.js dist/esm/backup-index.js
10+
11+
echo ' ' >> dist/backup-index.js
12+
echo ' ' >> dist/esm/backup-index.js
13+
echo ' ' >> dist/backup-index.d.ts

test/lib/rebuild-dist.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ test('内容写入文件', async () => {
6161
foo,
6262
aaaaa
6363
});
64-
//# sourceMappingURL=index.js.map"
64+
//# sourceMappingURL=index.js.map
65+
"
6566
`);
6667

6768
await expect(readFile(path.join(distDir, 'index.d.ts'), 'utf8')).resolves
@@ -71,6 +72,7 @@ test('内容写入文件', async () => {
7172
};
7273
7374
export { aaaaa };
75+
7476
7577
declare const foo = { bar: "baz" };
7678
export { foo };"
@@ -83,7 +85,8 @@ test('内容写入文件', async () => {
8385
export {
8486
aaaaa
8587
};
86-
//# sourceMappingURL=index.js.map
88+
//# sourceMappingURL=index.js.map
89+
8790
var foo = { bar: "baz" }
8891
export { foo };"
8992
`);

0 commit comments

Comments
 (0)