44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import dts from "vite-plugin-dts";
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: {
|
|
index: "./src/index.ts",
|
|
"analysis/classify": "./src/analysis/classify/index.ts",
|
|
"analysis/colour": "./src/analysis/colour/index.ts",
|
|
"analysis/edges": "./src/analysis/edges/index.ts",
|
|
"analysis/pools": "./src/analysis/pools/index.ts",
|
|
errors: "./src/errors/index.ts",
|
|
pipeline: "./src/pipeline/index.ts",
|
|
quantise: "./src/quantise/index.ts",
|
|
schemas: "./src/schemas/index.ts",
|
|
"spatial/cleanup": "./src/spatial/cleanup/index.ts",
|
|
types: "./src/types/index.ts",
|
|
},
|
|
formats: ["es"],
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
/^@suaveplan\//,
|
|
/^@opentelemetry\//,
|
|
"image-q",
|
|
"zod",
|
|
"tslib",
|
|
],
|
|
output: {
|
|
exports: "named",
|
|
},
|
|
},
|
|
sourcemap: true,
|
|
target: "es2022",
|
|
},
|
|
plugins: [
|
|
dts({
|
|
tsconfigPath: "./tsconfig.lib.json",
|
|
entryRoot: "./src",
|
|
}),
|
|
],
|
|
});
|