roam/tsup.config.ts

31 lines
560 B
TypeScript

import { defineConfig } from "tsup";
const SINGLETON_EXTERNALS = [
"preact",
"preact/hooks",
"preact/jsx-runtime",
"preact/compat",
"@jackyzha0/quartz",
"@jackyzha0/quartz/*",
"vfile",
"vfile/*",
"unified",
];
export default defineConfig({
entry: {
index: "src/index.ts",
},
format: ["esm"],
dts: true,
tsconfig: "tsconfig.build.json",
sourcemap: true,
clean: true,
treeshake: true,
target: "es2022",
splitting: false,
noExternal: [/.*/],
external: SINGLETON_EXTERNALS,
outDir: "dist",
platform: "node",
});