mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-23 15:42:09 -05:00
34 lines
727 B
TypeScript
34 lines
727 B
TypeScript
import { defineConfig } from "tsdown";
|
|
|
|
export default defineConfig([
|
|
{
|
|
dts: { build: true, incremental: true },
|
|
format: ["esm"],
|
|
entry: [
|
|
"./src/index.ts",
|
|
"./src/client.ts",
|
|
"./src/proxy.ts",
|
|
"./src/storage.ts",
|
|
],
|
|
treeshake: true,
|
|
},
|
|
{
|
|
dts: { build: true, incremental: true },
|
|
format: ["esm"],
|
|
entry: ["./src/preload.ts"],
|
|
deps: {
|
|
neverBundle: (id, _, isResolved) => {
|
|
if (isResolved) return false;
|
|
return (
|
|
!id.startsWith(".") &&
|
|
!id.startsWith("better-call") &&
|
|
!id.startsWith("@better-auth/core")
|
|
);
|
|
},
|
|
alwaysBundle: [/^@better-auth\/core/, /^better-call/],
|
|
onlyAllowBundle: ["better-call", "@standard-schema/spec"],
|
|
},
|
|
treeshake: true,
|
|
},
|
|
]);
|