-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathvite.config.mts
More file actions
35 lines (34 loc) · 958 Bytes
/
vite.config.mts
File metadata and controls
35 lines (34 loc) · 958 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
import { resolve } from "path";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
export default defineConfig({
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(import.meta.dirname, "src/webglplot.ts"),
name: "webglplot",
// the proper extensions will be added
fileName: "webglplot",
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {},
},
},
},
plugins: [
dts({
// Roll up declarations into a single bundle (API Extractor)
rollupTypes: true,
insertTypesEntry: true,
// Restrict .d.ts emission to the library sources
include: ["src/**/*"],
exclude: ["demos/**/*"],
}),
],
});