Update link-in-app.ts

This commit is contained in:
Joseph Garrone 2023-03-25 02:26:03 +01:00 committed by GitHub
parent cf2abbb127
commit a27c95896b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,14 @@ fs.writeFileSync(
"main": packageJsonParsed["main"]?.replace(/^dist\//, ""), "main": packageJsonParsed["main"]?.replace(/^dist\//, ""),
"types": packageJsonParsed["types"]?.replace(/^dist\//, ""), "types": packageJsonParsed["types"]?.replace(/^dist\//, ""),
"module": packageJsonParsed["module"]?.replace(/^dist\//, ""), "module": packageJsonParsed["module"]?.replace(/^dist\//, ""),
"bin": !("bin" in packageJsonParsed)
? undefined
: Object.fromEntries(
Object.entries(packageJsonParsed["bin"]).map(([key, value]) => [
key,
(value as string).replace(/^dist\//, "")
])
),
"exports": !("exports" in packageJsonParsed) "exports": !("exports" in packageJsonParsed)
? undefined ? undefined
: Object.fromEntries( : Object.fromEntries(