-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
41 lines (40 loc) · 1.12 KB
/
vite.config.js
File metadata and controls
41 lines (40 loc) · 1.12 KB
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
38
39
40
41
import path from "node:path";
import { resolve } from "path";
import { defineConfig } from "vite";
import { normalizePath } from "vite";
import dts from "vite-plugin-dts";
import vitePluginExternal from "vite-plugin-external";
import { viteStaticCopy } from "vite-plugin-static-copy";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [
tsconfigPaths(),
dts({
exclude: "./src/Mumbo.spec.ts",
}),
vitePluginExternal({
nodeBuiltins: true,
}),
viteStaticCopy({
targets: [
{
src: normalizePath(path.resolve(__dirname, "./package.json")),
dest: "./",
},
{
src: normalizePath(path.resolve(__dirname, "./README.md")),
dest: "./",
},
],
}),
],
build: {
minify: false,
lib: {
entry: resolve(__dirname, "src/Mumbo.ts"),
name: "Mumbo",
fileName: "Mumbo",
formats: ["cjs"],
},
},
});