Skip to content

Commit d7a67bf

Browse files
committed
refactor(release): update entry names and paths for exports
1 parent 1d11792 commit d7a67bf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/release.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ pkg.version = version;
4141
// 运行构建
4242
console.log("🔨 Running build process...");
4343
const entries = [
44-
{ name: "/index", path: "/index.ts" },
45-
{ name: "/testing", path: "/testing/index.ts" },
44+
{ name: "index", path: "/index.ts" },
45+
{ name: "testing", path: "/testing/index.ts" },
4646
];
4747
await build({
4848
entry: Object.fromEntries(entries.map((e) => [e.name, `src${e.path}`])),
@@ -55,10 +55,10 @@ await build({
5555
// 生成 exports
5656
const exports: Record<string, any> = Object.fromEntries(
5757
entries.map((e) => [
58-
`.${e.name === "/index" ? "" : e.name}`,
58+
`.${e.name === "index" ? "" : "/" + e.name}`,
5959
{
60-
types: `.${e.name}.d.mts`,
61-
import: `.${e.name}.mjs`,
60+
types: `./${e.name}.d.mts`,
61+
import: `./${e.name}.mjs`,
6262
},
6363
]),
6464
);

0 commit comments

Comments
 (0)