-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
37 lines (36 loc) · 974 Bytes
/
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
/// <reference types="vitest" />
import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config";
import path from "path";
import { typescriptPaths } from "rollup-plugin-typescript-paths";
import dts from "vite-plugin-dts";
export default defineWorkersConfig({
build: {
sourcemap: true,
minify: false,
outDir: "dist",
lib: {
entry: path.resolve(__dirname, "src/index.ts"),
name: "CachifiedAdapterCloudflareKv",
fileName: "index",
formats: ["es", "cjs"],
},
rollupOptions: {
external: [/^@epic-web\/cachified$/, /^@cloudflare\/workers-types(\/.*)?$/],
},
},
plugins: [typescriptPaths(), dts({ rollupTypes: true })],
test: {
poolOptions: {
workers: {
wrangler: {
configPath: "./wrangler.vitest.toml",
},
},
},
reporters: ["verbose"],
coverage: {
provider: "istanbul",
reporter: ["text", "html", "clover", "json"],
},
},
});