Files
suaveplan/packages/media/audio/audio-cli/vite.config.ts
2026-05-27 23:47:53 +01:00

53 lines
1.6 KiB
TypeScript

import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
export default defineConfig({
root: __dirname,
cacheDir: "../../../../node_modules/.vite/packages/audio-cli",
plugins: [
dts({
entryRoot: "src",
tsconfigPath: "./tsconfig.lib.json",
insertTypesEntry: true,
}),
],
build: {
outDir: "./dist",
emptyOutDir: true,
reportCompressedSize: true,
sourcemap: true,
lib: {
entry: {
index: "src/index.ts",
bin: "src/bin/index.ts",
cli: "src/cli/index.ts",
"error-codes": "src/error-codes/index.ts",
"pipeline/parser": "src/pipeline/parser.ts",
"commands/process": "src/commands/process.ts",
"commands/batch": "src/commands/batch.ts",
"commands/analyze": "src/commands/analyze.ts",
"commands/convert": "src/commands/convert.ts",
"commands/info": "src/commands/info.ts",
"commands/play": "src/commands/play.ts",
"commands/record": "src/commands/record.ts",
},
formats: ["es"],
},
rollupOptions: {
treeshake: true,
output: {
preserveModules: true,
preserveModulesRoot: "src",
entryFileNames: "[name].js",
},
external: [
/^@suaveplan\//,
/^@opentelemetry\//,
/^node:/,
"tslib",
"zod",
],
},
},
});