Skip to content

Commit 7acb739

Browse files
committed
Fix build script for local testing
1 parent 40ed108 commit 7acb739

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/scripts/build.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from "../bin/only-include-used-icons";
1010
import * as child_process from "child_process";
1111
import { oppa } from "oppa";
12+
import { assert } from "tsafe/assert";
1213

1314
(async () => {
1415
const { args } = oppa()
@@ -107,16 +108,10 @@ import { oppa } from "oppa";
107108
"types": packageJsonParsed["types"].replace(/^dist\//, ""),
108109
"module": packageJsonParsed["module"].replace(/^dist\//, ""),
109110
"exports": Object.fromEntries(
110-
Object.entries(packageJsonParsed["exports"]).map(([path, obj]) => [
111-
path,
112-
Object.fromEntries(
113-
Object.entries(obj as Record<string, string>).map(
114-
([type, path]) => [
115-
type,
116-
path.replace(/^\.\/dist\//, "./")
117-
]
118-
)
119-
)
111+
Object.entries(packageJsonParsed["exports"]).map(([key, value]) => [
112+
key,
113+
(assert(typeof value === "string"),
114+
value.replace(/^\.\/dist\//, "./"))
120115
])
121116
)
122117
};

0 commit comments

Comments
 (0)