-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.ts
More file actions
58 lines (57 loc) · 1.44 KB
/
Copy pathvite.config.ts
File metadata and controls
58 lines (57 loc) · 1.44 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { playwright } from "@vitest/browser-playwright";
import { defineConfig } from "vitest/config";
export default defineConfig({
server: {
host: "127.0.0.1",
},
build: {
target: "ESNext",
minify: false,
lib: {
entry: {
"ponyfill/asyncIterator": "src/ponyfill/asyncIterator.ts",
"ponyfill/fromAnyIterable": "src/ponyfill/fromAnyIterable.ts",
"ponyfill/index": "src/ponyfill/index.ts",
"polyfill/asyncIterator": "src/polyfill/asyncIterator.ts",
"polyfill/fromAnyIterable": "src/polyfill/fromAnyIterable.ts",
"polyfill/index": "src/polyfill/index.ts",
"index/asyncIterator": "src/index/asyncIterator.ts",
"index/fromAnyIterable": "src/index/fromAnyIterable.ts",
"index/index": "src/index/index.ts",
},
formats: ["es"],
fileName: (_, entryName) => `${entryName}.js`,
},
outDir: "dist",
rollupOptions: {
output: {
preserveModules: true,
preserveModulesRoot: "src",
entryFileNames: "[name].js",
},
},
},
test: {
api: {
host: "127.0.0.1",
},
browser: {
enabled: true,
headless: true,
provider: playwright(),
instances: [
{
browser: "chromium",
},
{
browser: "firefox",
},
],
screenshotFailures: false,
},
coverage: {
provider: "istanbul",
exclude: ["tests/**"],
},
},
});