-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
46 lines (45 loc) · 1.29 KB
/
vite.config.ts
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
42
43
44
45
46
import path from "path";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
export default defineConfig({
build: {
emptyOutDir: true,
lib: {
entry: {
index: path.resolve(__dirname, "src/index.ts"),
jsonRpcEngine: path.resolve(__dirname, "src/json-rpc-engine/index.ts"),
jsonRpcMiddlewareStream: path.resolve(
__dirname,
"src/json-rpc-middleware-stream/index.ts"
),
objectMultiplex: path.resolve(
__dirname,
"src/object-multiplex/index.ts"
),
postMessageStream: path.resolve(
__dirname,
"src/post-message-stream/index.ts"
),
providers: path.resolve(__dirname, "src/providers/index.ts"),
rpcErrors: path.resolve(__dirname, "src/rpc-errors/index.ts"),
safeEventEmitter: path.resolve(
__dirname,
"src/safe-event-emitter/index.ts"
),
superstruct: path.resolve(__dirname, "src/superstruct/index.ts"),
utils: path.resolve(__dirname, "src/utils/index.ts"),
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
plugins: [
dts({
insertTypesEntry: true,
exclude: ["**/*.test.ts", "**/*.spec.ts", "**/__tests__/**"],
}),
],
});