Initial Commit
This commit is contained in:
73
packages/ui/react/react-audio-fingerprint/vite.config.ts
Normal file
73
packages/ui/react/react-audio-fingerprint/vite.config.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
|
||||
export default defineConfig({
|
||||
root: __dirname,
|
||||
cacheDir: "../../../../node_modules/.vite/packages/react-audio-fingerprint",
|
||||
plugins: [
|
||||
react(),
|
||||
dts({
|
||||
entryRoot: "src",
|
||||
tsconfigPath: "./tsconfig.lib.json",
|
||||
insertTypesEntry: true,
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
outDir: "./dist",
|
||||
emptyOutDir: true,
|
||||
reportCompressedSize: true,
|
||||
sourcemap: true,
|
||||
lib: {
|
||||
entry: {
|
||||
index: "src/index.ts",
|
||||
"error-codes/index": "src/error-codes/index.ts",
|
||||
"fingerprint/index": "src/fingerprint/index.ts",
|
||||
"fingerprint/peak-detector/index":
|
||||
"src/fingerprint/peak-detector/index.ts",
|
||||
"fingerprint/constellation/index":
|
||||
"src/fingerprint/constellation/index.ts",
|
||||
"fingerprint/audio-fingerprinter/index":
|
||||
"src/fingerprint/audio-fingerprinter/index.ts",
|
||||
"fingerprint/fingerprint-matcher/index":
|
||||
"src/fingerprint/fingerprint-matcher/index.ts",
|
||||
"corpus/index": "src/corpus/index.ts",
|
||||
"corpus/memory-corpus/index":
|
||||
"src/corpus/memory-corpus/index.ts",
|
||||
"backends/index": "src/backends/index.ts",
|
||||
"backends/local-backend/index":
|
||||
"src/backends/local-backend/index.ts",
|
||||
"hooks/index": "src/hooks/index.ts",
|
||||
"hooks/use-audio-fingerprint/index":
|
||||
"src/hooks/use-audio-fingerprint/index.ts",
|
||||
"components/index": "src/components/index.ts",
|
||||
"components/fingerprint-match-display/index":
|
||||
"src/components/fingerprint-match-display/index.ts",
|
||||
},
|
||||
formats: ["es"],
|
||||
},
|
||||
rollupOptions: {
|
||||
treeshake: true,
|
||||
output: {
|
||||
preserveModules: true,
|
||||
preserveModulesRoot: "src",
|
||||
entryFileNames: "[name].js",
|
||||
},
|
||||
external: [
|
||||
"@suaveplan/audio-analysis-spectrum",
|
||||
"@suaveplan/audio-core",
|
||||
"@suaveplan/audio-core/document/document",
|
||||
"@suaveplan/audio-engine-browser",
|
||||
"@suaveplan/audio-engine-browser/decode",
|
||||
"@suaveplan/error",
|
||||
"@suaveplan/types",
|
||||
"react",
|
||||
"react-dom",
|
||||
"react/jsx-runtime",
|
||||
"tslib",
|
||||
"zod",
|
||||
/^node:/,
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user