forked from argentlabs/x-sessions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
37 lines (34 loc) · 783 Bytes
/
vite.config.ts
File metadata and controls
37 lines (34 loc) · 783 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
// vite.config.js
import { resolve as resolvePath } from "path"
import dts from "vite-plugin-dts"
import { defineConfig } from "vitest/config"
export default defineConfig({
build: {
rollupOptions: {
external: ["starknet"],
output: {
exports: "named",
},
},
emptyOutDir: false,
lib: {
entry: resolvePath(__dirname, "src/main.ts"),
name: "sessions",
// the proper extensions will be added
fileName: "sessions",
},
},
optimizeDeps: {
include: ["starknet"],
},
plugins: [
dts({
entryRoot: resolvePath(__dirname, "src"),
insertTypesEntry: true,
exclude: "**/__tests__/**",
}),
],
esbuild: {
pure: process.env.NODE_ENV === "production" ? ["console.log"] : [],
},
})