diff --git a/scripts/build-success.sh b/scripts/build-success.sh index 75371b0..375f632 100644 --- a/scripts/build-success.sh +++ b/scripts/build-success.sh @@ -7,3 +7,7 @@ echo '{"type":"module"}' > dist/esm/package.json cp dist/index.js dist/backup-index.js cp dist/index.d.ts dist/backup-index.d.ts cp dist/esm/index.js dist/esm/backup-index.js + +echo ' ' >> dist/backup-index.js +echo ' ' >> dist/esm/backup-index.js +echo ' ' >> dist/backup-index.d.ts diff --git a/test/lib/rebuild-dist.test.ts b/test/lib/rebuild-dist.test.ts index 0ffb13b..69ed274 100644 --- a/test/lib/rebuild-dist.test.ts +++ b/test/lib/rebuild-dist.test.ts @@ -61,7 +61,8 @@ test('内容写入文件', async () => { foo, aaaaa }); - //# sourceMappingURL=index.js.map" + //# sourceMappingURL=index.js.map + " `); await expect(readFile(path.join(distDir, 'index.d.ts'), 'utf8')).resolves @@ -71,6 +72,7 @@ test('内容写入文件', async () => { }; export { aaaaa }; + declare const foo = { bar: "baz" }; export { foo };" @@ -83,7 +85,8 @@ test('内容写入文件', async () => { export { aaaaa }; - //# sourceMappingURL=index.js.map + //# sourceMappingURL=index.js.map + var foo = { bar: "baz" } export { foo };" `);