mirror of
https://github.com/LukeHagar/crossws.git
synced 2025-12-06 12:27:46 +00:00
chore: update build config
This commit is contained in:
@@ -6,7 +6,12 @@ export default defineBuildConfig({
|
||||
rollup: {
|
||||
inlineDependencies: true,
|
||||
},
|
||||
externals: ["@cloudflare/workers-types", "bun", "@deno/types", "uWebSockets.js"],
|
||||
externals: [
|
||||
"@cloudflare/workers-types",
|
||||
"bun",
|
||||
"@deno/types",
|
||||
"uWebSockets.js",
|
||||
],
|
||||
hooks: {
|
||||
async "build:done"(ctx) {
|
||||
const entries = Object.keys(ctx.pkg.exports || {})
|
||||
@@ -14,7 +19,6 @@ export default defineBuildConfig({
|
||||
.map((key) => key.slice(2));
|
||||
for (const entry of entries) {
|
||||
const dst = join(ctx.options.rootDir, entry + ".d.ts");
|
||||
console.log(">", dst);
|
||||
await mkdir(dirname(dst), { recursive: true });
|
||||
const relativePath =
|
||||
("..".repeat(entry.split("/").length - 1) || ".") + `/dist/${entry}`;
|
||||
|
||||
Reference in New Issue
Block a user