20 lines
471 B
TypeScript
20 lines
471 B
TypeScript
import { defineConfig } from "tsup";
|
|
|
|
export default defineConfig({
|
|
entry: ["src/index.ts"],
|
|
format: ["esm"],
|
|
dts: true,
|
|
clean: true,
|
|
// Bundle face-api and tensorflow inline (they're pure JS).
|
|
// Keep sharp and canvas external (they have native C++ bindings).
|
|
noExternal: [
|
|
"@vladmandic/face-api",
|
|
"@tensorflow/tfjs",
|
|
"@tensorflow/tfjs-backend-wasm"
|
|
],
|
|
external: [
|
|
"sharp",
|
|
"canvas"
|
|
],
|
|
});
|