-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvite.config.ts
More file actions
37 lines (36 loc) · 909 Bytes
/
Copy pathvite.config.ts
File metadata and controls
37 lines (36 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/// <reference types="vitest/config" />
import { resolve } from "path";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "neiro",
formats: ["es", "cjs"],
fileName: "index",
},
rollupOptions: {
// Don't bundle these — users install them alongside neiro
external: ["@breezystack/lamejs", "audio-decode"],
},
target: "es2022",
sourcemap: true,
minify: false, // Library — let consumers minify
},
plugins: [
dts({
rollupTypes: true, // Bundle .d.ts into a single file
}),
],
test: {
globals: true,
environment: "node",
include: ["tests/**/*.test.ts"],
coverage: {
provider: "v8",
include: ["src/**/*.ts"],
exclude: ["src/index.ts"], // Re-exports only
},
},
});