-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
34 lines (32 loc) · 749 Bytes
/
vite.config.ts
File metadata and controls
34 lines (32 loc) · 749 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
import path from "node:path";
import unpluginDts from "unplugin-dts/vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { defineConfig } from "vitest/config";
const tsconfig = path.resolve(import.meta.dirname, "tsconfig.build.json");
export default defineConfig({
plugins: [
tsconfigPaths({ projects: [tsconfig] }),
unpluginDts({
tsconfigPath: tsconfig,
}),
],
build: {
lib: {
entry: "./src/index.ts",
name: "Modivo",
formats: ["es", "cjs", "umd"],
fileName: (format) => `index.${format}.js`,
},
rollupOptions: {
// Externalize deps that shouldn't be bundled
external: [],
output: {
globals: {},
},
},
sourcemap: true,
outDir: "dist",
emptyOutDir: true,
target: "esnext",
},
});